@@ -10,18 +10,18 @@ def get(self):
10
10
"""Get Account"""
11
11
12
12
13
- path = '/account'
13
+ api_path = '/account'
14
14
params = {}
15
15
16
- return self .client .call ('get' , path , {
16
+ return self .client .call ('get' , api_path , {
17
17
'content-type' : 'application/json' ,
18
18
}, params )
19
19
20
20
def update_email (self , email , password ):
21
21
"""Update Email"""
22
22
23
23
24
- path = '/account/email'
24
+ api_path = '/account/email'
25
25
params = {}
26
26
if email is None :
27
27
raise AppwriteException ('Missing required parameter: "email"' )
@@ -33,44 +33,73 @@ def update_email(self, email, password):
33
33
params ['email' ] = email
34
34
params ['password' ] = password
35
35
36
- return self .client .call ('patch' , path , {
36
+ return self .client .call ('patch' , api_path , {
37
+ 'content-type' : 'application/json' ,
38
+ }, params )
39
+
40
+ def list_identities (self , queries = None ):
41
+ """List Identities"""
42
+
43
+
44
+ api_path = '/account/identities'
45
+ params = {}
46
+
47
+ params ['queries' ] = queries
48
+
49
+ return self .client .call ('get' , api_path , {
50
+ 'content-type' : 'application/json' ,
51
+ }, params )
52
+
53
+ def delete_identity (self , identity_id ):
54
+ """Delete Identity"""
55
+
56
+
57
+ api_path = '/account/identities/{identityId}'
58
+ params = {}
59
+ if identity_id is None :
60
+ raise AppwriteException ('Missing required parameter: "identity_id"' )
61
+
62
+ path = path .replace ('{identityId}' , identity_id )
63
+
64
+
65
+ return self .client .call ('delete' , api_path , {
37
66
'content-type' : 'application/json' ,
38
67
}, params )
39
68
40
69
def list_logs (self , queries = None ):
41
70
"""List Logs"""
42
71
43
72
44
- path = '/account/logs'
73
+ api_path = '/account/logs'
45
74
params = {}
46
75
47
76
params ['queries' ] = queries
48
77
49
- return self .client .call ('get' , path , {
78
+ return self .client .call ('get' , api_path , {
50
79
'content-type' : 'application/json' ,
51
80
}, params )
52
81
53
82
def update_name (self , name ):
54
83
"""Update Name"""
55
84
56
85
57
- path = '/account/name'
86
+ api_path = '/account/name'
58
87
params = {}
59
88
if name is None :
60
89
raise AppwriteException ('Missing required parameter: "name"' )
61
90
62
91
63
92
params ['name' ] = name
64
93
65
- return self .client .call ('patch' , path , {
94
+ return self .client .call ('patch' , api_path , {
66
95
'content-type' : 'application/json' ,
67
96
}, params )
68
97
69
98
def update_password (self , password , old_password = None ):
70
99
"""Update Password"""
71
100
72
101
73
- path = '/account/password'
102
+ api_path = '/account/password'
74
103
params = {}
75
104
if password is None :
76
105
raise AppwriteException ('Missing required parameter: "password"' )
@@ -79,15 +108,15 @@ def update_password(self, password, old_password = None):
79
108
params ['password' ] = password
80
109
params ['oldPassword' ] = old_password
81
110
82
- return self .client .call ('patch' , path , {
111
+ return self .client .call ('patch' , api_path , {
83
112
'content-type' : 'application/json' ,
84
113
}, params )
85
114
86
115
def update_phone (self , phone , password ):
87
116
"""Update Phone"""
88
117
89
118
90
- path = '/account/phone'
119
+ api_path = '/account/phone'
91
120
params = {}
92
121
if phone is None :
93
122
raise AppwriteException ('Missing required parameter: "phone"' )
@@ -99,42 +128,42 @@ def update_phone(self, phone, password):
99
128
params ['phone' ] = phone
100
129
params ['password' ] = password
101
130
102
- return self .client .call ('patch' , path , {
131
+ return self .client .call ('patch' , api_path , {
103
132
'content-type' : 'application/json' ,
104
133
}, params )
105
134
106
135
def get_prefs (self ):
107
136
"""Get Account Preferences"""
108
137
109
138
110
- path = '/account/prefs'
139
+ api_path = '/account/prefs'
111
140
params = {}
112
141
113
- return self .client .call ('get' , path , {
142
+ return self .client .call ('get' , api_path , {
114
143
'content-type' : 'application/json' ,
115
144
}, params )
116
145
117
146
def update_prefs (self , prefs ):
118
147
"""Update Preferences"""
119
148
120
149
121
- path = '/account/prefs'
150
+ api_path = '/account/prefs'
122
151
params = {}
123
152
if prefs is None :
124
153
raise AppwriteException ('Missing required parameter: "prefs"' )
125
154
126
155
127
156
params ['prefs' ] = prefs
128
157
129
- return self .client .call ('patch' , path , {
158
+ return self .client .call ('patch' , api_path , {
130
159
'content-type' : 'application/json' ,
131
160
}, params )
132
161
133
162
def create_recovery (self , email , url ):
134
163
"""Create Password Recovery"""
135
164
136
165
137
- path = '/account/recovery'
166
+ api_path = '/account/recovery'
138
167
params = {}
139
168
if email is None :
140
169
raise AppwriteException ('Missing required parameter: "email"' )
@@ -146,15 +175,15 @@ def create_recovery(self, email, url):
146
175
params ['email' ] = email
147
176
params ['url' ] = url
148
177
149
- return self .client .call ('post' , path , {
178
+ return self .client .call ('post' , api_path , {
150
179
'content-type' : 'application/json' ,
151
180
}, params )
152
181
153
182
def update_recovery (self , user_id , secret , password , password_again ):
154
183
"""Create Password Recovery (confirmation)"""
155
184
156
185
157
- path = '/account/recovery'
186
+ api_path = '/account/recovery'
158
187
params = {}
159
188
if user_id is None :
160
189
raise AppwriteException ('Missing required parameter: "user_id"' )
@@ -174,112 +203,112 @@ def update_recovery(self, user_id, secret, password, password_again):
174
203
params ['password' ] = password
175
204
params ['passwordAgain' ] = password_again
176
205
177
- return self .client .call ('put' , path , {
206
+ return self .client .call ('put' , api_path , {
178
207
'content-type' : 'application/json' ,
179
208
}, params )
180
209
181
210
def list_sessions (self ):
182
211
"""List Sessions"""
183
212
184
213
185
- path = '/account/sessions'
214
+ api_path = '/account/sessions'
186
215
params = {}
187
216
188
- return self .client .call ('get' , path , {
217
+ return self .client .call ('get' , api_path , {
189
218
'content-type' : 'application/json' ,
190
219
}, params )
191
220
192
221
def delete_sessions (self ):
193
222
"""Delete Sessions"""
194
223
195
224
196
- path = '/account/sessions'
225
+ api_path = '/account/sessions'
197
226
params = {}
198
227
199
- return self .client .call ('delete' , path , {
228
+ return self .client .call ('delete' , api_path , {
200
229
'content-type' : 'application/json' ,
201
230
}, params )
202
231
203
232
def get_session (self , session_id ):
204
233
"""Get Session"""
205
234
206
235
207
- path = '/account/sessions/{sessionId}'
236
+ api_path = '/account/sessions/{sessionId}'
208
237
params = {}
209
238
if session_id is None :
210
239
raise AppwriteException ('Missing required parameter: "session_id"' )
211
240
212
241
path = path .replace ('{sessionId}' , session_id )
213
242
214
243
215
- return self .client .call ('get' , path , {
244
+ return self .client .call ('get' , api_path , {
216
245
'content-type' : 'application/json' ,
217
246
}, params )
218
247
219
248
def update_session (self , session_id ):
220
249
"""Update OAuth Session (Refresh Tokens)"""
221
250
222
251
223
- path = '/account/sessions/{sessionId}'
252
+ api_path = '/account/sessions/{sessionId}'
224
253
params = {}
225
254
if session_id is None :
226
255
raise AppwriteException ('Missing required parameter: "session_id"' )
227
256
228
257
path = path .replace ('{sessionId}' , session_id )
229
258
230
259
231
- return self .client .call ('patch' , path , {
260
+ return self .client .call ('patch' , api_path , {
232
261
'content-type' : 'application/json' ,
233
262
}, params )
234
263
235
264
def delete_session (self , session_id ):
236
265
"""Delete Session"""
237
266
238
267
239
- path = '/account/sessions/{sessionId}'
268
+ api_path = '/account/sessions/{sessionId}'
240
269
params = {}
241
270
if session_id is None :
242
271
raise AppwriteException ('Missing required parameter: "session_id"' )
243
272
244
273
path = path .replace ('{sessionId}' , session_id )
245
274
246
275
247
- return self .client .call ('delete' , path , {
276
+ return self .client .call ('delete' , api_path , {
248
277
'content-type' : 'application/json' ,
249
278
}, params )
250
279
251
280
def update_status (self ):
252
281
"""Update Status"""
253
282
254
283
255
- path = '/account/status'
284
+ api_path = '/account/status'
256
285
params = {}
257
286
258
- return self .client .call ('patch' , path , {
287
+ return self .client .call ('patch' , api_path , {
259
288
'content-type' : 'application/json' ,
260
289
}, params )
261
290
262
291
def create_verification (self , url ):
263
292
"""Create Email Verification"""
264
293
265
294
266
- path = '/account/verification'
295
+ api_path = '/account/verification'
267
296
params = {}
268
297
if url is None :
269
298
raise AppwriteException ('Missing required parameter: "url"' )
270
299
271
300
272
301
params ['url' ] = url
273
302
274
- return self .client .call ('post' , path , {
303
+ return self .client .call ('post' , api_path , {
275
304
'content-type' : 'application/json' ,
276
305
}, params )
277
306
278
307
def update_verification (self , user_id , secret ):
279
308
"""Create Email Verification (confirmation)"""
280
309
281
310
282
- path = '/account/verification'
311
+ api_path = '/account/verification'
283
312
params = {}
284
313
if user_id is None :
285
314
raise AppwriteException ('Missing required parameter: "user_id"' )
@@ -291,26 +320,26 @@ def update_verification(self, user_id, secret):
291
320
params ['userId' ] = user_id
292
321
params ['secret' ] = secret
293
322
294
- return self .client .call ('put' , path , {
323
+ return self .client .call ('put' , api_path , {
295
324
'content-type' : 'application/json' ,
296
325
}, params )
297
326
298
327
def create_phone_verification (self ):
299
328
"""Create Phone Verification"""
300
329
301
330
302
- path = '/account/verification/phone'
331
+ api_path = '/account/verification/phone'
303
332
params = {}
304
333
305
- return self .client .call ('post' , path , {
334
+ return self .client .call ('post' , api_path , {
306
335
'content-type' : 'application/json' ,
307
336
}, params )
308
337
309
338
def update_phone_verification (self , user_id , secret ):
310
339
"""Create Phone Verification (confirmation)"""
311
340
312
341
313
- path = '/account/verification/phone'
342
+ api_path = '/account/verification/phone'
314
343
params = {}
315
344
if user_id is None :
316
345
raise AppwriteException ('Missing required parameter: "user_id"' )
@@ -322,6 +351,6 @@ def update_phone_verification(self, user_id, secret):
322
351
params ['userId' ] = user_id
323
352
params ['secret' ] = secret
324
353
325
- return self .client .call ('put' , path , {
354
+ return self .client .call ('put' , api_path , {
326
355
'content-type' : 'application/json' ,
327
356
}, params )
0 commit comments