@@ -12,12 +12,6 @@ class Client():
12
12
13
13
config = None
14
14
15
- health_path = "health"
16
- key_path = 'keys'
17
- sys_info_path = 'sys-info'
18
- version_path = 'version'
19
- stat_path = 'stats'
20
-
21
15
def __init__ (self , url , apiKey = None ):
22
16
"""
23
17
Parameters
@@ -95,7 +89,7 @@ def get_all_stats(self):
95
89
stats: `dict`
96
90
Dictionnary containing stats about your MeiliSearch instance
97
91
"""
98
- return HttpRequests .get (self .config , self .stat_path )
92
+ return HttpRequests .get (self .config , self .config . stat_path )
99
93
100
94
def health (self ):
101
95
"""Get health of meilisearch
@@ -107,7 +101,7 @@ def health(self):
107
101
HTTPError
108
102
If meilisearch is not healthy
109
103
"""
110
- return HttpRequests .get (self .config , self .health_path )
104
+ return HttpRequests .get (self .config , self .config . health_path )
111
105
112
106
def update_health (self , health ):
113
107
"""Update health of meilisearch
@@ -119,7 +113,7 @@ def update_health(self, health):
119
113
health: bool
120
114
Boolean reprensenting the healthyness of meilisearch. True for healthy.
121
115
"""
122
- return HttpRequests .put (self .config , self .health_path , {'health' : health })
116
+ return HttpRequests .put (self .config , self .config . health_path , {'health' : health })
123
117
124
118
def get_keys (self ):
125
119
"""Get all keys created
@@ -132,7 +126,7 @@ def get_keys(self):
132
126
List of keys and their information.
133
127
https://docs.meilisearch.com/references/keys.html#get-keys
134
128
"""
135
- return HttpRequests .get (self .config , self .key_path )
129
+ return HttpRequests .get (self .config , self .config . key_path )
136
130
137
131
def get_sys_info (self ):
138
132
"""Get system information of meilisearch
@@ -144,7 +138,7 @@ def get_sys_info(self):
144
138
sys_info: dict
145
139
Information about memory and processor usage.
146
140
"""
147
- return HttpRequests .get (self .config , self .sys_info_path )
141
+ return HttpRequests .get (self .config , self .config . sys_info_path )
148
142
149
143
def get_version (self ):
150
144
"""Get version meilisearch
@@ -154,7 +148,7 @@ def get_version(self):
154
148
version: dict
155
149
Information about version of meilisearch.
156
150
"""
157
- return HttpRequests .get (self .config , self .version_path )
151
+ return HttpRequests .get (self .config , self .config . version_path )
158
152
159
153
def version (self ):
160
154
"""Alias for get_version
0 commit comments