appwrite 8.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +4 -4
- data/lib/appwrite/models/attribute_boolean.rb +5 -0
- data/lib/appwrite/models/attribute_datetime.rb +5 -0
- data/lib/appwrite/models/attribute_email.rb +5 -0
- data/lib/appwrite/models/attribute_enum.rb +5 -0
- data/lib/appwrite/models/attribute_float.rb +5 -0
- data/lib/appwrite/models/attribute_integer.rb +5 -0
- data/lib/appwrite/models/attribute_ip.rb +5 -0
- data/lib/appwrite/models/attribute_relationship.rb +5 -0
- data/lib/appwrite/models/attribute_string.rb +5 -0
- data/lib/appwrite/models/attribute_url.rb +5 -0
- data/lib/appwrite/models/database.rb +8 -3
- data/lib/appwrite/models/deployment.rb +63 -13
- data/lib/appwrite/models/execution.rb +40 -20
- data/lib/appwrite/models/function.rb +53 -13
- data/lib/appwrite/models/headers.rb +32 -0
- data/lib/appwrite/models/health_status.rb +5 -0
- data/lib/appwrite/models/identity.rb +72 -0
- data/lib/appwrite/models/identity_list.rb +32 -0
- data/lib/appwrite/models/index.rb +5 -0
- data/lib/appwrite/models/locale_code.rb +32 -0
- data/lib/appwrite/models/locale_code_list.rb +32 -0
- data/lib/appwrite/models/user.rb +13 -3
- data/lib/appwrite/models/variable.rb +10 -5
- data/lib/appwrite/role.rb +56 -0
- data/lib/appwrite/services/account.rb +185 -130
- data/lib/appwrite/services/avatars.rb +42 -42
- data/lib/appwrite/services/databases.rb +274 -262
- data/lib/appwrite/services/functions.rb +229 -143
- data/lib/appwrite/services/graphql.rb +12 -12
- data/lib/appwrite/services/health.rb +111 -62
- data/lib/appwrite/services/locale.rb +67 -42
- data/lib/appwrite/services/storage.rb +85 -83
- data/lib/appwrite/services/teams.rb +80 -79
- data/lib/appwrite/services/users.rb +248 -150
- data/lib/appwrite.rb +5 -0
- metadata +7 -2
@@ -7,25 +7,25 @@ module Appwrite
|
|
7
7
|
@client = client
|
8
8
|
end
|
9
9
|
|
10
|
-
# Get currently logged in user
|
10
|
+
# Get the currently logged in user.
|
11
11
|
#
|
12
12
|
#
|
13
13
|
# @return [User]
|
14
14
|
def get()
|
15
|
-
|
15
|
+
api_path = '/account'
|
16
16
|
|
17
|
-
|
17
|
+
api_params = {
|
18
18
|
}
|
19
19
|
|
20
|
-
|
20
|
+
api_headers = {
|
21
21
|
"content-type": 'application/json',
|
22
22
|
}
|
23
23
|
|
24
24
|
@client.call(
|
25
25
|
method: 'GET',
|
26
|
-
path:
|
27
|
-
headers:
|
28
|
-
params:
|
26
|
+
path: api_path,
|
27
|
+
headers: api_headers,
|
28
|
+
params: api_params,
|
29
29
|
response_type: Models::User
|
30
30
|
)
|
31
31
|
end
|
@@ -45,7 +45,7 @@ module Appwrite
|
|
45
45
|
#
|
46
46
|
# @return [User]
|
47
47
|
def update_email(email:, password:)
|
48
|
-
|
48
|
+
api_path = '/account/email'
|
49
49
|
|
50
50
|
if email.nil?
|
51
51
|
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
@@ -55,47 +55,102 @@ module Appwrite
|
|
55
55
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
56
56
|
end
|
57
57
|
|
58
|
-
|
58
|
+
api_params = {
|
59
59
|
email: email,
|
60
60
|
password: password,
|
61
61
|
}
|
62
62
|
|
63
|
-
|
63
|
+
api_headers = {
|
64
64
|
"content-type": 'application/json',
|
65
65
|
}
|
66
66
|
|
67
67
|
@client.call(
|
68
68
|
method: 'PATCH',
|
69
|
-
path:
|
70
|
-
headers:
|
71
|
-
params:
|
69
|
+
path: api_path,
|
70
|
+
headers: api_headers,
|
71
|
+
params: api_params,
|
72
72
|
response_type: Models::User
|
73
73
|
)
|
74
74
|
end
|
75
75
|
|
76
76
|
|
77
|
-
# Get
|
78
|
-
#
|
77
|
+
# Get the list of identities for the currently logged in user.
|
78
|
+
#
|
79
|
+
# @param [String] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
|
80
|
+
#
|
81
|
+
# @return [IdentityList]
|
82
|
+
def list_identities(queries: nil)
|
83
|
+
api_path = '/account/identities'
|
84
|
+
|
85
|
+
api_params = {
|
86
|
+
queries: queries,
|
87
|
+
}
|
88
|
+
|
89
|
+
api_headers = {
|
90
|
+
"content-type": 'application/json',
|
91
|
+
}
|
92
|
+
|
93
|
+
@client.call(
|
94
|
+
method: 'GET',
|
95
|
+
path: api_path,
|
96
|
+
headers: api_headers,
|
97
|
+
params: api_params,
|
98
|
+
response_type: Models::IdentityList
|
99
|
+
)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
# Delete an identity by its unique ID.
|
104
|
+
#
|
105
|
+
# @param [String] identity_id Identity ID.
|
106
|
+
#
|
107
|
+
# @return []
|
108
|
+
def delete_identity(identity_id:)
|
109
|
+
api_path = '/account/identities/{identityId}'
|
110
|
+
.gsub('{identityId}', identity_id)
|
111
|
+
|
112
|
+
if identity_id.nil?
|
113
|
+
raise Appwrite::Exception.new('Missing required parameter: "identityId"')
|
114
|
+
end
|
115
|
+
|
116
|
+
api_params = {
|
117
|
+
}
|
118
|
+
|
119
|
+
api_headers = {
|
120
|
+
"content-type": 'application/json',
|
121
|
+
}
|
122
|
+
|
123
|
+
@client.call(
|
124
|
+
method: 'DELETE',
|
125
|
+
path: api_path,
|
126
|
+
headers: api_headers,
|
127
|
+
params: api_params,
|
128
|
+
)
|
129
|
+
end
|
130
|
+
|
131
|
+
|
132
|
+
# Get the list of latest security activity logs for the currently logged in
|
133
|
+
# user. Each log returns user IP address, location and date and time of log.
|
79
134
|
#
|
80
135
|
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
81
136
|
#
|
82
137
|
# @return [LogList]
|
83
138
|
def list_logs(queries: nil)
|
84
|
-
|
139
|
+
api_path = '/account/logs'
|
85
140
|
|
86
|
-
|
141
|
+
api_params = {
|
87
142
|
queries: queries,
|
88
143
|
}
|
89
144
|
|
90
|
-
|
145
|
+
api_headers = {
|
91
146
|
"content-type": 'application/json',
|
92
147
|
}
|
93
148
|
|
94
149
|
@client.call(
|
95
150
|
method: 'GET',
|
96
|
-
path:
|
97
|
-
headers:
|
98
|
-
params:
|
151
|
+
path: api_path,
|
152
|
+
headers: api_headers,
|
153
|
+
params: api_params,
|
99
154
|
response_type: Models::LogList
|
100
155
|
)
|
101
156
|
end
|
@@ -107,25 +162,25 @@ module Appwrite
|
|
107
162
|
#
|
108
163
|
# @return [User]
|
109
164
|
def update_name(name:)
|
110
|
-
|
165
|
+
api_path = '/account/name'
|
111
166
|
|
112
167
|
if name.nil?
|
113
168
|
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
114
169
|
end
|
115
170
|
|
116
|
-
|
171
|
+
api_params = {
|
117
172
|
name: name,
|
118
173
|
}
|
119
174
|
|
120
|
-
|
175
|
+
api_headers = {
|
121
176
|
"content-type": 'application/json',
|
122
177
|
}
|
123
178
|
|
124
179
|
@client.call(
|
125
180
|
method: 'PATCH',
|
126
|
-
path:
|
127
|
-
headers:
|
128
|
-
params:
|
181
|
+
path: api_path,
|
182
|
+
headers: api_headers,
|
183
|
+
params: api_params,
|
129
184
|
response_type: Models::User
|
130
185
|
)
|
131
186
|
end
|
@@ -140,26 +195,26 @@ module Appwrite
|
|
140
195
|
#
|
141
196
|
# @return [User]
|
142
197
|
def update_password(password:, old_password: nil)
|
143
|
-
|
198
|
+
api_path = '/account/password'
|
144
199
|
|
145
200
|
if password.nil?
|
146
201
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
147
202
|
end
|
148
203
|
|
149
|
-
|
204
|
+
api_params = {
|
150
205
|
password: password,
|
151
206
|
oldPassword: old_password,
|
152
207
|
}
|
153
208
|
|
154
|
-
|
209
|
+
api_headers = {
|
155
210
|
"content-type": 'application/json',
|
156
211
|
}
|
157
212
|
|
158
213
|
@client.call(
|
159
214
|
method: 'PATCH',
|
160
|
-
path:
|
161
|
-
headers:
|
162
|
-
params:
|
215
|
+
path: api_path,
|
216
|
+
headers: api_headers,
|
217
|
+
params: api_params,
|
163
218
|
response_type: Models::User
|
164
219
|
)
|
165
220
|
end
|
@@ -176,7 +231,7 @@ module Appwrite
|
|
176
231
|
#
|
177
232
|
# @return [User]
|
178
233
|
def update_phone(phone:, password:)
|
179
|
-
|
234
|
+
api_path = '/account/phone'
|
180
235
|
|
181
236
|
if phone.nil?
|
182
237
|
raise Appwrite::Exception.new('Missing required parameter: "phone"')
|
@@ -186,44 +241,44 @@ module Appwrite
|
|
186
241
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
187
242
|
end
|
188
243
|
|
189
|
-
|
244
|
+
api_params = {
|
190
245
|
phone: phone,
|
191
246
|
password: password,
|
192
247
|
}
|
193
248
|
|
194
|
-
|
249
|
+
api_headers = {
|
195
250
|
"content-type": 'application/json',
|
196
251
|
}
|
197
252
|
|
198
253
|
@client.call(
|
199
254
|
method: 'PATCH',
|
200
|
-
path:
|
201
|
-
headers:
|
202
|
-
params:
|
255
|
+
path: api_path,
|
256
|
+
headers: api_headers,
|
257
|
+
params: api_params,
|
203
258
|
response_type: Models::User
|
204
259
|
)
|
205
260
|
end
|
206
261
|
|
207
262
|
|
208
|
-
# Get
|
263
|
+
# Get the preferences as a key-value object for the currently logged in user.
|
209
264
|
#
|
210
265
|
#
|
211
266
|
# @return [Preferences]
|
212
267
|
def get_prefs()
|
213
|
-
|
268
|
+
api_path = '/account/prefs'
|
214
269
|
|
215
|
-
|
270
|
+
api_params = {
|
216
271
|
}
|
217
272
|
|
218
|
-
|
273
|
+
api_headers = {
|
219
274
|
"content-type": 'application/json',
|
220
275
|
}
|
221
276
|
|
222
277
|
@client.call(
|
223
278
|
method: 'GET',
|
224
|
-
path:
|
225
|
-
headers:
|
226
|
-
params:
|
279
|
+
path: api_path,
|
280
|
+
headers: api_headers,
|
281
|
+
params: api_params,
|
227
282
|
response_type: Models::Preferences
|
228
283
|
)
|
229
284
|
end
|
@@ -237,25 +292,25 @@ module Appwrite
|
|
237
292
|
#
|
238
293
|
# @return [User]
|
239
294
|
def update_prefs(prefs:)
|
240
|
-
|
295
|
+
api_path = '/account/prefs'
|
241
296
|
|
242
297
|
if prefs.nil?
|
243
298
|
raise Appwrite::Exception.new('Missing required parameter: "prefs"')
|
244
299
|
end
|
245
300
|
|
246
|
-
|
301
|
+
api_params = {
|
247
302
|
prefs: prefs,
|
248
303
|
}
|
249
304
|
|
250
|
-
|
305
|
+
api_headers = {
|
251
306
|
"content-type": 'application/json',
|
252
307
|
}
|
253
308
|
|
254
309
|
@client.call(
|
255
310
|
method: 'PATCH',
|
256
|
-
path:
|
257
|
-
headers:
|
258
|
-
params:
|
311
|
+
path: api_path,
|
312
|
+
headers: api_headers,
|
313
|
+
params: api_params,
|
259
314
|
response_type: Models::User
|
260
315
|
)
|
261
316
|
end
|
@@ -275,7 +330,7 @@ module Appwrite
|
|
275
330
|
#
|
276
331
|
# @return [Token]
|
277
332
|
def create_recovery(email:, url:)
|
278
|
-
|
333
|
+
api_path = '/account/recovery'
|
279
334
|
|
280
335
|
if email.nil?
|
281
336
|
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
@@ -285,20 +340,20 @@ module Appwrite
|
|
285
340
|
raise Appwrite::Exception.new('Missing required parameter: "url"')
|
286
341
|
end
|
287
342
|
|
288
|
-
|
343
|
+
api_params = {
|
289
344
|
email: email,
|
290
345
|
url: url,
|
291
346
|
}
|
292
347
|
|
293
|
-
|
348
|
+
api_headers = {
|
294
349
|
"content-type": 'application/json',
|
295
350
|
}
|
296
351
|
|
297
352
|
@client.call(
|
298
353
|
method: 'POST',
|
299
|
-
path:
|
300
|
-
headers:
|
301
|
-
params:
|
354
|
+
path: api_path,
|
355
|
+
headers: api_headers,
|
356
|
+
params: api_params,
|
302
357
|
response_type: Models::Token
|
303
358
|
)
|
304
359
|
end
|
@@ -321,7 +376,7 @@ module Appwrite
|
|
321
376
|
#
|
322
377
|
# @return [Token]
|
323
378
|
def update_recovery(user_id:, secret:, password:, password_again:)
|
324
|
-
|
379
|
+
api_path = '/account/recovery'
|
325
380
|
|
326
381
|
if user_id.nil?
|
327
382
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -339,47 +394,47 @@ module Appwrite
|
|
339
394
|
raise Appwrite::Exception.new('Missing required parameter: "passwordAgain"')
|
340
395
|
end
|
341
396
|
|
342
|
-
|
397
|
+
api_params = {
|
343
398
|
userId: user_id,
|
344
399
|
secret: secret,
|
345
400
|
password: password,
|
346
401
|
passwordAgain: password_again,
|
347
402
|
}
|
348
403
|
|
349
|
-
|
404
|
+
api_headers = {
|
350
405
|
"content-type": 'application/json',
|
351
406
|
}
|
352
407
|
|
353
408
|
@client.call(
|
354
409
|
method: 'PUT',
|
355
|
-
path:
|
356
|
-
headers:
|
357
|
-
params:
|
410
|
+
path: api_path,
|
411
|
+
headers: api_headers,
|
412
|
+
params: api_params,
|
358
413
|
response_type: Models::Token
|
359
414
|
)
|
360
415
|
end
|
361
416
|
|
362
417
|
|
363
|
-
# Get
|
364
|
-
#
|
418
|
+
# Get the list of active sessions across different devices for the currently
|
419
|
+
# logged in user.
|
365
420
|
#
|
366
421
|
#
|
367
422
|
# @return [SessionList]
|
368
423
|
def list_sessions()
|
369
|
-
|
424
|
+
api_path = '/account/sessions'
|
370
425
|
|
371
|
-
|
426
|
+
api_params = {
|
372
427
|
}
|
373
428
|
|
374
|
-
|
429
|
+
api_headers = {
|
375
430
|
"content-type": 'application/json',
|
376
431
|
}
|
377
432
|
|
378
433
|
@client.call(
|
379
434
|
method: 'GET',
|
380
|
-
path:
|
381
|
-
headers:
|
382
|
-
params:
|
435
|
+
path: api_path,
|
436
|
+
headers: api_headers,
|
437
|
+
params: api_params,
|
383
438
|
response_type: Models::SessionList
|
384
439
|
)
|
385
440
|
end
|
@@ -391,20 +446,20 @@ module Appwrite
|
|
391
446
|
#
|
392
447
|
# @return []
|
393
448
|
def delete_sessions()
|
394
|
-
|
449
|
+
api_path = '/account/sessions'
|
395
450
|
|
396
|
-
|
451
|
+
api_params = {
|
397
452
|
}
|
398
453
|
|
399
|
-
|
454
|
+
api_headers = {
|
400
455
|
"content-type": 'application/json',
|
401
456
|
}
|
402
457
|
|
403
458
|
@client.call(
|
404
459
|
method: 'DELETE',
|
405
|
-
path:
|
406
|
-
headers:
|
407
|
-
params:
|
460
|
+
path: api_path,
|
461
|
+
headers: api_headers,
|
462
|
+
params: api_params,
|
408
463
|
)
|
409
464
|
end
|
410
465
|
|
@@ -416,25 +471,25 @@ module Appwrite
|
|
416
471
|
#
|
417
472
|
# @return [Session]
|
418
473
|
def get_session(session_id:)
|
419
|
-
|
474
|
+
api_path = '/account/sessions/{sessionId}'
|
420
475
|
.gsub('{sessionId}', session_id)
|
421
476
|
|
422
477
|
if session_id.nil?
|
423
478
|
raise Appwrite::Exception.new('Missing required parameter: "sessionId"')
|
424
479
|
end
|
425
480
|
|
426
|
-
|
481
|
+
api_params = {
|
427
482
|
}
|
428
483
|
|
429
|
-
|
484
|
+
api_headers = {
|
430
485
|
"content-type": 'application/json',
|
431
486
|
}
|
432
487
|
|
433
488
|
@client.call(
|
434
489
|
method: 'GET',
|
435
|
-
path:
|
436
|
-
headers:
|
437
|
-
params:
|
490
|
+
path: api_path,
|
491
|
+
headers: api_headers,
|
492
|
+
params: api_params,
|
438
493
|
response_type: Models::Session
|
439
494
|
)
|
440
495
|
end
|
@@ -448,58 +503,58 @@ module Appwrite
|
|
448
503
|
#
|
449
504
|
# @return [Session]
|
450
505
|
def update_session(session_id:)
|
451
|
-
|
506
|
+
api_path = '/account/sessions/{sessionId}'
|
452
507
|
.gsub('{sessionId}', session_id)
|
453
508
|
|
454
509
|
if session_id.nil?
|
455
510
|
raise Appwrite::Exception.new('Missing required parameter: "sessionId"')
|
456
511
|
end
|
457
512
|
|
458
|
-
|
513
|
+
api_params = {
|
459
514
|
}
|
460
515
|
|
461
|
-
|
516
|
+
api_headers = {
|
462
517
|
"content-type": 'application/json',
|
463
518
|
}
|
464
519
|
|
465
520
|
@client.call(
|
466
521
|
method: 'PATCH',
|
467
|
-
path:
|
468
|
-
headers:
|
469
|
-
params:
|
522
|
+
path: api_path,
|
523
|
+
headers: api_headers,
|
524
|
+
params: api_params,
|
470
525
|
response_type: Models::Session
|
471
526
|
)
|
472
527
|
end
|
473
528
|
|
474
529
|
|
475
|
-
#
|
476
|
-
#
|
477
|
-
#
|
478
|
-
#
|
530
|
+
# Logout the user. Use 'current' as the session ID to logout on this device,
|
531
|
+
# use a session ID to logout on another device. If you're looking to logout
|
532
|
+
# the user on all devices, use [Delete
|
533
|
+
# Sessions](/docs/client/account#accountDeleteSessions) instead.
|
479
534
|
#
|
480
535
|
# @param [String] session_id Session ID. Use the string 'current' to delete the current device session.
|
481
536
|
#
|
482
537
|
# @return []
|
483
538
|
def delete_session(session_id:)
|
484
|
-
|
539
|
+
api_path = '/account/sessions/{sessionId}'
|
485
540
|
.gsub('{sessionId}', session_id)
|
486
541
|
|
487
542
|
if session_id.nil?
|
488
543
|
raise Appwrite::Exception.new('Missing required parameter: "sessionId"')
|
489
544
|
end
|
490
545
|
|
491
|
-
|
546
|
+
api_params = {
|
492
547
|
}
|
493
548
|
|
494
|
-
|
549
|
+
api_headers = {
|
495
550
|
"content-type": 'application/json',
|
496
551
|
}
|
497
552
|
|
498
553
|
@client.call(
|
499
554
|
method: 'DELETE',
|
500
|
-
path:
|
501
|
-
headers:
|
502
|
-
params:
|
555
|
+
path: api_path,
|
556
|
+
headers: api_headers,
|
557
|
+
params: api_params,
|
503
558
|
)
|
504
559
|
end
|
505
560
|
|
@@ -511,20 +566,20 @@ module Appwrite
|
|
511
566
|
#
|
512
567
|
# @return [User]
|
513
568
|
def update_status()
|
514
|
-
|
569
|
+
api_path = '/account/status'
|
515
570
|
|
516
|
-
|
571
|
+
api_params = {
|
517
572
|
}
|
518
573
|
|
519
|
-
|
574
|
+
api_headers = {
|
520
575
|
"content-type": 'application/json',
|
521
576
|
}
|
522
577
|
|
523
578
|
@client.call(
|
524
579
|
method: 'PATCH',
|
525
|
-
path:
|
526
|
-
headers:
|
527
|
-
params:
|
580
|
+
path: api_path,
|
581
|
+
headers: api_headers,
|
582
|
+
params: api_params,
|
528
583
|
response_type: Models::User
|
529
584
|
)
|
530
585
|
end
|
@@ -550,25 +605,25 @@ module Appwrite
|
|
550
605
|
#
|
551
606
|
# @return [Token]
|
552
607
|
def create_verification(url:)
|
553
|
-
|
608
|
+
api_path = '/account/verification'
|
554
609
|
|
555
610
|
if url.nil?
|
556
611
|
raise Appwrite::Exception.new('Missing required parameter: "url"')
|
557
612
|
end
|
558
613
|
|
559
|
-
|
614
|
+
api_params = {
|
560
615
|
url: url,
|
561
616
|
}
|
562
617
|
|
563
|
-
|
618
|
+
api_headers = {
|
564
619
|
"content-type": 'application/json',
|
565
620
|
}
|
566
621
|
|
567
622
|
@client.call(
|
568
623
|
method: 'POST',
|
569
|
-
path:
|
570
|
-
headers:
|
571
|
-
params:
|
624
|
+
path: api_path,
|
625
|
+
headers: api_headers,
|
626
|
+
params: api_params,
|
572
627
|
response_type: Models::Token
|
573
628
|
)
|
574
629
|
end
|
@@ -584,7 +639,7 @@ module Appwrite
|
|
584
639
|
#
|
585
640
|
# @return [Token]
|
586
641
|
def update_verification(user_id:, secret:)
|
587
|
-
|
642
|
+
api_path = '/account/verification'
|
588
643
|
|
589
644
|
if user_id.nil?
|
590
645
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -594,20 +649,20 @@ module Appwrite
|
|
594
649
|
raise Appwrite::Exception.new('Missing required parameter: "secret"')
|
595
650
|
end
|
596
651
|
|
597
|
-
|
652
|
+
api_params = {
|
598
653
|
userId: user_id,
|
599
654
|
secret: secret,
|
600
655
|
}
|
601
656
|
|
602
|
-
|
657
|
+
api_headers = {
|
603
658
|
"content-type": 'application/json',
|
604
659
|
}
|
605
660
|
|
606
661
|
@client.call(
|
607
662
|
method: 'PUT',
|
608
|
-
path:
|
609
|
-
headers:
|
610
|
-
params:
|
663
|
+
path: api_path,
|
664
|
+
headers: api_headers,
|
665
|
+
params: api_params,
|
611
666
|
response_type: Models::Token
|
612
667
|
)
|
613
668
|
end
|
@@ -623,20 +678,20 @@ module Appwrite
|
|
623
678
|
#
|
624
679
|
# @return [Token]
|
625
680
|
def create_phone_verification()
|
626
|
-
|
681
|
+
api_path = '/account/verification/phone'
|
627
682
|
|
628
|
-
|
683
|
+
api_params = {
|
629
684
|
}
|
630
685
|
|
631
|
-
|
686
|
+
api_headers = {
|
632
687
|
"content-type": 'application/json',
|
633
688
|
}
|
634
689
|
|
635
690
|
@client.call(
|
636
691
|
method: 'POST',
|
637
|
-
path:
|
638
|
-
headers:
|
639
|
-
params:
|
692
|
+
path: api_path,
|
693
|
+
headers: api_headers,
|
694
|
+
params: api_params,
|
640
695
|
response_type: Models::Token
|
641
696
|
)
|
642
697
|
end
|
@@ -652,7 +707,7 @@ module Appwrite
|
|
652
707
|
#
|
653
708
|
# @return [Token]
|
654
709
|
def update_phone_verification(user_id:, secret:)
|
655
|
-
|
710
|
+
api_path = '/account/verification/phone'
|
656
711
|
|
657
712
|
if user_id.nil?
|
658
713
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -662,20 +717,20 @@ module Appwrite
|
|
662
717
|
raise Appwrite::Exception.new('Missing required parameter: "secret"')
|
663
718
|
end
|
664
719
|
|
665
|
-
|
720
|
+
api_params = {
|
666
721
|
userId: user_id,
|
667
722
|
secret: secret,
|
668
723
|
}
|
669
724
|
|
670
|
-
|
725
|
+
api_headers = {
|
671
726
|
"content-type": 'application/json',
|
672
727
|
}
|
673
728
|
|
674
729
|
@client.call(
|
675
730
|
method: 'PUT',
|
676
|
-
path:
|
677
|
-
headers:
|
678
|
-
params:
|
731
|
+
path: api_path,
|
732
|
+
headers: api_headers,
|
733
|
+
params: api_params,
|
679
734
|
response_type: Models::Token
|
680
735
|
)
|
681
736
|
end
|