appwrite 7.0.0.pre.RC2 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +2 -2
- data/lib/appwrite/models/document.rb +10 -5
- data/lib/appwrite/models/execution.rb +5 -5
- data/lib/appwrite/models/function.rb +5 -5
- data/lib/appwrite/role.rb +15 -7
- data/lib/appwrite/services/account.rb +87 -107
- data/lib/appwrite/services/avatars.rb +27 -34
- data/lib/appwrite/services/databases.rb +379 -410
- data/lib/appwrite/services/functions.rb +180 -200
- data/lib/appwrite/services/health.rb +0 -10
- data/lib/appwrite/services/locale.rb +6 -13
- data/lib/appwrite/services/storage.rb +105 -118
- data/lib/appwrite/services/teams.rb +94 -105
- data/lib/appwrite/services/users.rb +226 -251
- metadata +4 -4
@@ -15,7 +15,6 @@ module Appwrite
|
|
15
15
|
#
|
16
16
|
# @return [UserList]
|
17
17
|
def list(queries: nil, search: nil)
|
18
|
-
|
19
18
|
path = '/users'
|
20
19
|
|
21
20
|
params = {
|
@@ -47,9 +46,12 @@ module Appwrite
|
|
47
46
|
#
|
48
47
|
# @return [User]
|
49
48
|
def create(user_id:, email: nil, phone: nil, password: nil, name: nil)
|
50
|
-
|
51
49
|
path = '/users'
|
52
50
|
|
51
|
+
if user_id.nil?
|
52
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
53
|
+
end
|
54
|
+
|
53
55
|
params = {
|
54
56
|
userId: user_id,
|
55
57
|
email: email,
|
@@ -61,10 +63,6 @@ module Appwrite
|
|
61
63
|
headers = {
|
62
64
|
"content-type": 'application/json',
|
63
65
|
}
|
64
|
-
if user_id.nil?
|
65
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
66
|
-
end
|
67
|
-
|
68
66
|
|
69
67
|
@client.call(
|
70
68
|
method: 'POST',
|
@@ -88,9 +86,20 @@ module Appwrite
|
|
88
86
|
#
|
89
87
|
# @return [User]
|
90
88
|
def create_argon2_user(user_id:, email:, password:, name: nil)
|
91
|
-
|
92
89
|
path = '/users/argon2'
|
93
90
|
|
91
|
+
if user_id.nil?
|
92
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
93
|
+
end
|
94
|
+
|
95
|
+
if email.nil?
|
96
|
+
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
97
|
+
end
|
98
|
+
|
99
|
+
if password.nil?
|
100
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
101
|
+
end
|
102
|
+
|
94
103
|
params = {
|
95
104
|
userId: user_id,
|
96
105
|
email: email,
|
@@ -101,18 +110,6 @@ module Appwrite
|
|
101
110
|
headers = {
|
102
111
|
"content-type": 'application/json',
|
103
112
|
}
|
104
|
-
if user_id.nil?
|
105
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
106
|
-
end
|
107
|
-
|
108
|
-
if email.nil?
|
109
|
-
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
110
|
-
end
|
111
|
-
|
112
|
-
if password.nil?
|
113
|
-
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
114
|
-
end
|
115
|
-
|
116
113
|
|
117
114
|
@client.call(
|
118
115
|
method: 'POST',
|
@@ -136,9 +133,20 @@ module Appwrite
|
|
136
133
|
#
|
137
134
|
# @return [User]
|
138
135
|
def create_bcrypt_user(user_id:, email:, password:, name: nil)
|
139
|
-
|
140
136
|
path = '/users/bcrypt'
|
141
137
|
|
138
|
+
if user_id.nil?
|
139
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
140
|
+
end
|
141
|
+
|
142
|
+
if email.nil?
|
143
|
+
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
144
|
+
end
|
145
|
+
|
146
|
+
if password.nil?
|
147
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
148
|
+
end
|
149
|
+
|
142
150
|
params = {
|
143
151
|
userId: user_id,
|
144
152
|
email: email,
|
@@ -149,18 +157,6 @@ module Appwrite
|
|
149
157
|
headers = {
|
150
158
|
"content-type": 'application/json',
|
151
159
|
}
|
152
|
-
if user_id.nil?
|
153
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
154
|
-
end
|
155
|
-
|
156
|
-
if email.nil?
|
157
|
-
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
158
|
-
end
|
159
|
-
|
160
|
-
if password.nil?
|
161
|
-
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
162
|
-
end
|
163
|
-
|
164
160
|
|
165
161
|
@client.call(
|
166
162
|
method: 'POST',
|
@@ -184,9 +180,20 @@ module Appwrite
|
|
184
180
|
#
|
185
181
|
# @return [User]
|
186
182
|
def create_md5_user(user_id:, email:, password:, name: nil)
|
187
|
-
|
188
183
|
path = '/users/md5'
|
189
184
|
|
185
|
+
if user_id.nil?
|
186
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
187
|
+
end
|
188
|
+
|
189
|
+
if email.nil?
|
190
|
+
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
191
|
+
end
|
192
|
+
|
193
|
+
if password.nil?
|
194
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
195
|
+
end
|
196
|
+
|
190
197
|
params = {
|
191
198
|
userId: user_id,
|
192
199
|
email: email,
|
@@ -197,18 +204,6 @@ module Appwrite
|
|
197
204
|
headers = {
|
198
205
|
"content-type": 'application/json',
|
199
206
|
}
|
200
|
-
if user_id.nil?
|
201
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
202
|
-
end
|
203
|
-
|
204
|
-
if email.nil?
|
205
|
-
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
206
|
-
end
|
207
|
-
|
208
|
-
if password.nil?
|
209
|
-
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
210
|
-
end
|
211
|
-
|
212
207
|
|
213
208
|
@client.call(
|
214
209
|
method: 'POST',
|
@@ -232,9 +227,20 @@ module Appwrite
|
|
232
227
|
#
|
233
228
|
# @return [User]
|
234
229
|
def create_ph_pass_user(user_id:, email:, password:, name: nil)
|
235
|
-
|
236
230
|
path = '/users/phpass'
|
237
231
|
|
232
|
+
if user_id.nil?
|
233
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
234
|
+
end
|
235
|
+
|
236
|
+
if email.nil?
|
237
|
+
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
238
|
+
end
|
239
|
+
|
240
|
+
if password.nil?
|
241
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
242
|
+
end
|
243
|
+
|
238
244
|
params = {
|
239
245
|
userId: user_id,
|
240
246
|
email: email,
|
@@ -245,18 +251,6 @@ module Appwrite
|
|
245
251
|
headers = {
|
246
252
|
"content-type": 'application/json',
|
247
253
|
}
|
248
|
-
if user_id.nil?
|
249
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
250
|
-
end
|
251
|
-
|
252
|
-
if email.nil?
|
253
|
-
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
254
|
-
end
|
255
|
-
|
256
|
-
if password.nil?
|
257
|
-
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
258
|
-
end
|
259
|
-
|
260
254
|
|
261
255
|
@client.call(
|
262
256
|
method: 'POST',
|
@@ -285,56 +279,55 @@ module Appwrite
|
|
285
279
|
#
|
286
280
|
# @return [User]
|
287
281
|
def create_scrypt_user(user_id:, email:, password:, password_salt:, password_cpu:, password_memory:, password_parallel:, password_length:, name: nil)
|
288
|
-
|
289
282
|
path = '/users/scrypt'
|
290
283
|
|
291
|
-
params = {
|
292
|
-
userId: user_id,
|
293
|
-
email: email,
|
294
|
-
password: password,
|
295
|
-
passwordSalt: password_salt,
|
296
|
-
passwordCpu: password_cpu,
|
297
|
-
passwordMemory: password_memory,
|
298
|
-
passwordParallel: password_parallel,
|
299
|
-
passwordLength: password_length,
|
300
|
-
name: name,
|
301
|
-
}
|
302
|
-
|
303
|
-
headers = {
|
304
|
-
"content-type": 'application/json',
|
305
|
-
}
|
306
284
|
if user_id.nil?
|
307
|
-
|
285
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
308
286
|
end
|
309
287
|
|
310
288
|
if email.nil?
|
311
|
-
|
289
|
+
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
312
290
|
end
|
313
291
|
|
314
292
|
if password.nil?
|
315
|
-
|
293
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
316
294
|
end
|
317
295
|
|
318
296
|
if password_salt.nil?
|
319
|
-
|
297
|
+
raise Appwrite::Exception.new('Missing required parameter: "passwordSalt"')
|
320
298
|
end
|
321
299
|
|
322
300
|
if password_cpu.nil?
|
323
|
-
|
301
|
+
raise Appwrite::Exception.new('Missing required parameter: "passwordCpu"')
|
324
302
|
end
|
325
303
|
|
326
304
|
if password_memory.nil?
|
327
|
-
|
305
|
+
raise Appwrite::Exception.new('Missing required parameter: "passwordMemory"')
|
328
306
|
end
|
329
307
|
|
330
308
|
if password_parallel.nil?
|
331
|
-
|
309
|
+
raise Appwrite::Exception.new('Missing required parameter: "passwordParallel"')
|
332
310
|
end
|
333
311
|
|
334
312
|
if password_length.nil?
|
335
|
-
|
313
|
+
raise Appwrite::Exception.new('Missing required parameter: "passwordLength"')
|
336
314
|
end
|
337
315
|
|
316
|
+
params = {
|
317
|
+
userId: user_id,
|
318
|
+
email: email,
|
319
|
+
password: password,
|
320
|
+
passwordSalt: password_salt,
|
321
|
+
passwordCpu: password_cpu,
|
322
|
+
passwordMemory: password_memory,
|
323
|
+
passwordParallel: password_parallel,
|
324
|
+
passwordLength: password_length,
|
325
|
+
name: name,
|
326
|
+
}
|
327
|
+
|
328
|
+
headers = {
|
329
|
+
"content-type": 'application/json',
|
330
|
+
}
|
338
331
|
|
339
332
|
@client.call(
|
340
333
|
method: 'POST',
|
@@ -361,46 +354,45 @@ module Appwrite
|
|
361
354
|
#
|
362
355
|
# @return [User]
|
363
356
|
def create_scrypt_modified_user(user_id:, email:, password:, password_salt:, password_salt_separator:, password_signer_key:, name: nil)
|
364
|
-
|
365
357
|
path = '/users/scrypt-modified'
|
366
358
|
|
367
|
-
params = {
|
368
|
-
userId: user_id,
|
369
|
-
email: email,
|
370
|
-
password: password,
|
371
|
-
passwordSalt: password_salt,
|
372
|
-
passwordSaltSeparator: password_salt_separator,
|
373
|
-
passwordSignerKey: password_signer_key,
|
374
|
-
name: name,
|
375
|
-
}
|
376
|
-
|
377
|
-
headers = {
|
378
|
-
"content-type": 'application/json',
|
379
|
-
}
|
380
359
|
if user_id.nil?
|
381
|
-
|
360
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
382
361
|
end
|
383
362
|
|
384
363
|
if email.nil?
|
385
|
-
|
364
|
+
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
386
365
|
end
|
387
366
|
|
388
367
|
if password.nil?
|
389
|
-
|
368
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
390
369
|
end
|
391
370
|
|
392
371
|
if password_salt.nil?
|
393
|
-
|
372
|
+
raise Appwrite::Exception.new('Missing required parameter: "passwordSalt"')
|
394
373
|
end
|
395
374
|
|
396
375
|
if password_salt_separator.nil?
|
397
|
-
|
376
|
+
raise Appwrite::Exception.new('Missing required parameter: "passwordSaltSeparator"')
|
398
377
|
end
|
399
378
|
|
400
379
|
if password_signer_key.nil?
|
401
|
-
|
380
|
+
raise Appwrite::Exception.new('Missing required parameter: "passwordSignerKey"')
|
402
381
|
end
|
403
382
|
|
383
|
+
params = {
|
384
|
+
userId: user_id,
|
385
|
+
email: email,
|
386
|
+
password: password,
|
387
|
+
passwordSalt: password_salt,
|
388
|
+
passwordSaltSeparator: password_salt_separator,
|
389
|
+
passwordSignerKey: password_signer_key,
|
390
|
+
name: name,
|
391
|
+
}
|
392
|
+
|
393
|
+
headers = {
|
394
|
+
"content-type": 'application/json',
|
395
|
+
}
|
404
396
|
|
405
397
|
@client.call(
|
406
398
|
method: 'POST',
|
@@ -425,9 +417,20 @@ module Appwrite
|
|
425
417
|
#
|
426
418
|
# @return [User]
|
427
419
|
def create_sha_user(user_id:, email:, password:, password_version: nil, name: nil)
|
428
|
-
|
429
420
|
path = '/users/sha'
|
430
421
|
|
422
|
+
if user_id.nil?
|
423
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
424
|
+
end
|
425
|
+
|
426
|
+
if email.nil?
|
427
|
+
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
428
|
+
end
|
429
|
+
|
430
|
+
if password.nil?
|
431
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
432
|
+
end
|
433
|
+
|
431
434
|
params = {
|
432
435
|
userId: user_id,
|
433
436
|
email: email,
|
@@ -439,18 +442,6 @@ module Appwrite
|
|
439
442
|
headers = {
|
440
443
|
"content-type": 'application/json',
|
441
444
|
}
|
442
|
-
if user_id.nil?
|
443
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
444
|
-
end
|
445
|
-
|
446
|
-
if email.nil?
|
447
|
-
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
448
|
-
end
|
449
|
-
|
450
|
-
if password.nil?
|
451
|
-
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
452
|
-
end
|
453
|
-
|
454
445
|
|
455
446
|
@client.call(
|
456
447
|
method: 'POST',
|
@@ -468,8 +459,12 @@ module Appwrite
|
|
468
459
|
#
|
469
460
|
# @return [User]
|
470
461
|
def get(user_id:)
|
471
|
-
|
472
462
|
path = '/users/{userId}'
|
463
|
+
.gsub('{userId}', user_id)
|
464
|
+
|
465
|
+
if user_id.nil?
|
466
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
467
|
+
end
|
473
468
|
|
474
469
|
params = {
|
475
470
|
}
|
@@ -477,11 +472,6 @@ module Appwrite
|
|
477
472
|
headers = {
|
478
473
|
"content-type": 'application/json',
|
479
474
|
}
|
480
|
-
if user_id.nil?
|
481
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
482
|
-
end
|
483
|
-
|
484
|
-
.gsub('{userId}', user_id)
|
485
475
|
|
486
476
|
@client.call(
|
487
477
|
method: 'GET',
|
@@ -503,8 +493,12 @@ module Appwrite
|
|
503
493
|
#
|
504
494
|
# @return []
|
505
495
|
def delete(user_id:)
|
506
|
-
|
507
496
|
path = '/users/{userId}'
|
497
|
+
.gsub('{userId}', user_id)
|
498
|
+
|
499
|
+
if user_id.nil?
|
500
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
501
|
+
end
|
508
502
|
|
509
503
|
params = {
|
510
504
|
}
|
@@ -512,11 +506,6 @@ module Appwrite
|
|
512
506
|
headers = {
|
513
507
|
"content-type": 'application/json',
|
514
508
|
}
|
515
|
-
if user_id.nil?
|
516
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
517
|
-
end
|
518
|
-
|
519
|
-
.gsub('{userId}', user_id)
|
520
509
|
|
521
510
|
@client.call(
|
522
511
|
method: 'DELETE',
|
@@ -534,8 +523,16 @@ module Appwrite
|
|
534
523
|
#
|
535
524
|
# @return [User]
|
536
525
|
def update_email(user_id:, email:)
|
537
|
-
|
538
526
|
path = '/users/{userId}/email'
|
527
|
+
.gsub('{userId}', user_id)
|
528
|
+
|
529
|
+
if user_id.nil?
|
530
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
531
|
+
end
|
532
|
+
|
533
|
+
if email.nil?
|
534
|
+
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
535
|
+
end
|
539
536
|
|
540
537
|
params = {
|
541
538
|
email: email,
|
@@ -544,15 +541,6 @@ module Appwrite
|
|
544
541
|
headers = {
|
545
542
|
"content-type": 'application/json',
|
546
543
|
}
|
547
|
-
if user_id.nil?
|
548
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
549
|
-
end
|
550
|
-
|
551
|
-
if email.nil?
|
552
|
-
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
553
|
-
end
|
554
|
-
|
555
|
-
.gsub('{userId}', user_id)
|
556
544
|
|
557
545
|
@client.call(
|
558
546
|
method: 'PATCH',
|
@@ -570,9 +558,13 @@ module Appwrite
|
|
570
558
|
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Only supported methods are limit and offset
|
571
559
|
#
|
572
560
|
# @return [LogList]
|
573
|
-
def
|
574
|
-
|
561
|
+
def list_logs(user_id:, queries: nil)
|
575
562
|
path = '/users/{userId}/logs'
|
563
|
+
.gsub('{userId}', user_id)
|
564
|
+
|
565
|
+
if user_id.nil?
|
566
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
567
|
+
end
|
576
568
|
|
577
569
|
params = {
|
578
570
|
queries: queries,
|
@@ -581,11 +573,6 @@ module Appwrite
|
|
581
573
|
headers = {
|
582
574
|
"content-type": 'application/json',
|
583
575
|
}
|
584
|
-
if user_id.nil?
|
585
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
586
|
-
end
|
587
|
-
|
588
|
-
.gsub('{userId}', user_id)
|
589
576
|
|
590
577
|
@client.call(
|
591
578
|
method: 'GET',
|
@@ -602,9 +589,13 @@ module Appwrite
|
|
602
589
|
# @param [String] user_id User ID.
|
603
590
|
#
|
604
591
|
# @return [MembershipList]
|
605
|
-
def
|
606
|
-
|
592
|
+
def list_memberships(user_id:)
|
607
593
|
path = '/users/{userId}/memberships'
|
594
|
+
.gsub('{userId}', user_id)
|
595
|
+
|
596
|
+
if user_id.nil?
|
597
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
598
|
+
end
|
608
599
|
|
609
600
|
params = {
|
610
601
|
}
|
@@ -612,11 +603,6 @@ module Appwrite
|
|
612
603
|
headers = {
|
613
604
|
"content-type": 'application/json',
|
614
605
|
}
|
615
|
-
if user_id.nil?
|
616
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
617
|
-
end
|
618
|
-
|
619
|
-
.gsub('{userId}', user_id)
|
620
606
|
|
621
607
|
@client.call(
|
622
608
|
method: 'GET',
|
@@ -635,8 +621,16 @@ module Appwrite
|
|
635
621
|
#
|
636
622
|
# @return [User]
|
637
623
|
def update_name(user_id:, name:)
|
638
|
-
|
639
624
|
path = '/users/{userId}/name'
|
625
|
+
.gsub('{userId}', user_id)
|
626
|
+
|
627
|
+
if user_id.nil?
|
628
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
629
|
+
end
|
630
|
+
|
631
|
+
if name.nil?
|
632
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
633
|
+
end
|
640
634
|
|
641
635
|
params = {
|
642
636
|
name: name,
|
@@ -645,15 +639,6 @@ module Appwrite
|
|
645
639
|
headers = {
|
646
640
|
"content-type": 'application/json',
|
647
641
|
}
|
648
|
-
if user_id.nil?
|
649
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
650
|
-
end
|
651
|
-
|
652
|
-
if name.nil?
|
653
|
-
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
654
|
-
end
|
655
|
-
|
656
|
-
.gsub('{userId}', user_id)
|
657
642
|
|
658
643
|
@client.call(
|
659
644
|
method: 'PATCH',
|
@@ -672,8 +657,16 @@ module Appwrite
|
|
672
657
|
#
|
673
658
|
# @return [User]
|
674
659
|
def update_password(user_id:, password:)
|
675
|
-
|
676
660
|
path = '/users/{userId}/password'
|
661
|
+
.gsub('{userId}', user_id)
|
662
|
+
|
663
|
+
if user_id.nil?
|
664
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
665
|
+
end
|
666
|
+
|
667
|
+
if password.nil?
|
668
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
669
|
+
end
|
677
670
|
|
678
671
|
params = {
|
679
672
|
password: password,
|
@@ -682,15 +675,6 @@ module Appwrite
|
|
682
675
|
headers = {
|
683
676
|
"content-type": 'application/json',
|
684
677
|
}
|
685
|
-
if user_id.nil?
|
686
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
687
|
-
end
|
688
|
-
|
689
|
-
if password.nil?
|
690
|
-
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
691
|
-
end
|
692
|
-
|
693
|
-
.gsub('{userId}', user_id)
|
694
678
|
|
695
679
|
@client.call(
|
696
680
|
method: 'PATCH',
|
@@ -709,8 +693,16 @@ module Appwrite
|
|
709
693
|
#
|
710
694
|
# @return [User]
|
711
695
|
def update_phone(user_id:, number:)
|
712
|
-
|
713
696
|
path = '/users/{userId}/phone'
|
697
|
+
.gsub('{userId}', user_id)
|
698
|
+
|
699
|
+
if user_id.nil?
|
700
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
701
|
+
end
|
702
|
+
|
703
|
+
if number.nil?
|
704
|
+
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
705
|
+
end
|
714
706
|
|
715
707
|
params = {
|
716
708
|
number: number,
|
@@ -719,15 +711,6 @@ module Appwrite
|
|
719
711
|
headers = {
|
720
712
|
"content-type": 'application/json',
|
721
713
|
}
|
722
|
-
if user_id.nil?
|
723
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
724
|
-
end
|
725
|
-
|
726
|
-
if number.nil?
|
727
|
-
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
728
|
-
end
|
729
|
-
|
730
|
-
.gsub('{userId}', user_id)
|
731
714
|
|
732
715
|
@client.call(
|
733
716
|
method: 'PATCH',
|
@@ -745,8 +728,12 @@ module Appwrite
|
|
745
728
|
#
|
746
729
|
# @return [Preferences]
|
747
730
|
def get_prefs(user_id:)
|
748
|
-
|
749
731
|
path = '/users/{userId}/prefs'
|
732
|
+
.gsub('{userId}', user_id)
|
733
|
+
|
734
|
+
if user_id.nil?
|
735
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
736
|
+
end
|
750
737
|
|
751
738
|
params = {
|
752
739
|
}
|
@@ -754,11 +741,6 @@ module Appwrite
|
|
754
741
|
headers = {
|
755
742
|
"content-type": 'application/json',
|
756
743
|
}
|
757
|
-
if user_id.nil?
|
758
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
759
|
-
end
|
760
|
-
|
761
|
-
.gsub('{userId}', user_id)
|
762
744
|
|
763
745
|
@client.call(
|
764
746
|
method: 'GET',
|
@@ -779,8 +761,16 @@ module Appwrite
|
|
779
761
|
#
|
780
762
|
# @return [Preferences]
|
781
763
|
def update_prefs(user_id:, prefs:)
|
782
|
-
|
783
764
|
path = '/users/{userId}/prefs'
|
765
|
+
.gsub('{userId}', user_id)
|
766
|
+
|
767
|
+
if user_id.nil?
|
768
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
769
|
+
end
|
770
|
+
|
771
|
+
if prefs.nil?
|
772
|
+
raise Appwrite::Exception.new('Missing required parameter: "prefs"')
|
773
|
+
end
|
784
774
|
|
785
775
|
params = {
|
786
776
|
prefs: prefs,
|
@@ -789,15 +779,6 @@ module Appwrite
|
|
789
779
|
headers = {
|
790
780
|
"content-type": 'application/json',
|
791
781
|
}
|
792
|
-
if user_id.nil?
|
793
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
794
|
-
end
|
795
|
-
|
796
|
-
if prefs.nil?
|
797
|
-
raise Appwrite::Exception.new('Missing required parameter: "prefs"')
|
798
|
-
end
|
799
|
-
|
800
|
-
.gsub('{userId}', user_id)
|
801
782
|
|
802
783
|
@client.call(
|
803
784
|
method: 'PATCH',
|
@@ -814,9 +795,13 @@ module Appwrite
|
|
814
795
|
# @param [String] user_id User ID.
|
815
796
|
#
|
816
797
|
# @return [SessionList]
|
817
|
-
def
|
818
|
-
|
798
|
+
def list_sessions(user_id:)
|
819
799
|
path = '/users/{userId}/sessions'
|
800
|
+
.gsub('{userId}', user_id)
|
801
|
+
|
802
|
+
if user_id.nil?
|
803
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
804
|
+
end
|
820
805
|
|
821
806
|
params = {
|
822
807
|
}
|
@@ -824,11 +809,6 @@ module Appwrite
|
|
824
809
|
headers = {
|
825
810
|
"content-type": 'application/json',
|
826
811
|
}
|
827
|
-
if user_id.nil?
|
828
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
829
|
-
end
|
830
|
-
|
831
|
-
.gsub('{userId}', user_id)
|
832
812
|
|
833
813
|
@client.call(
|
834
814
|
method: 'GET',
|
@@ -846,8 +826,12 @@ module Appwrite
|
|
846
826
|
#
|
847
827
|
# @return []
|
848
828
|
def delete_sessions(user_id:)
|
849
|
-
|
850
829
|
path = '/users/{userId}/sessions'
|
830
|
+
.gsub('{userId}', user_id)
|
831
|
+
|
832
|
+
if user_id.nil?
|
833
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
834
|
+
end
|
851
835
|
|
852
836
|
params = {
|
853
837
|
}
|
@@ -855,11 +839,6 @@ module Appwrite
|
|
855
839
|
headers = {
|
856
840
|
"content-type": 'application/json',
|
857
841
|
}
|
858
|
-
if user_id.nil?
|
859
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
860
|
-
end
|
861
|
-
|
862
|
-
.gsub('{userId}', user_id)
|
863
842
|
|
864
843
|
@client.call(
|
865
844
|
method: 'DELETE',
|
@@ -877,25 +856,24 @@ module Appwrite
|
|
877
856
|
#
|
878
857
|
# @return []
|
879
858
|
def delete_session(user_id:, session_id:)
|
880
|
-
|
881
859
|
path = '/users/{userId}/sessions/{sessionId}'
|
860
|
+
.gsub('{userId}', user_id)
|
861
|
+
.gsub('{sessionId}', session_id)
|
882
862
|
|
883
|
-
params = {
|
884
|
-
}
|
885
|
-
|
886
|
-
headers = {
|
887
|
-
"content-type": 'application/json',
|
888
|
-
}
|
889
863
|
if user_id.nil?
|
890
|
-
|
864
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
891
865
|
end
|
892
866
|
|
893
867
|
if session_id.nil?
|
894
|
-
|
868
|
+
raise Appwrite::Exception.new('Missing required parameter: "sessionId"')
|
895
869
|
end
|
896
870
|
|
897
|
-
|
898
|
-
|
871
|
+
params = {
|
872
|
+
}
|
873
|
+
|
874
|
+
headers = {
|
875
|
+
"content-type": 'application/json',
|
876
|
+
}
|
899
877
|
|
900
878
|
@client.call(
|
901
879
|
method: 'DELETE',
|
@@ -914,8 +892,16 @@ module Appwrite
|
|
914
892
|
#
|
915
893
|
# @return [User]
|
916
894
|
def update_status(user_id:, status:)
|
917
|
-
|
918
895
|
path = '/users/{userId}/status'
|
896
|
+
.gsub('{userId}', user_id)
|
897
|
+
|
898
|
+
if user_id.nil?
|
899
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
900
|
+
end
|
901
|
+
|
902
|
+
if status.nil?
|
903
|
+
raise Appwrite::Exception.new('Missing required parameter: "status"')
|
904
|
+
end
|
919
905
|
|
920
906
|
params = {
|
921
907
|
status: status,
|
@@ -924,15 +910,6 @@ module Appwrite
|
|
924
910
|
headers = {
|
925
911
|
"content-type": 'application/json',
|
926
912
|
}
|
927
|
-
if user_id.nil?
|
928
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
929
|
-
end
|
930
|
-
|
931
|
-
if status.nil?
|
932
|
-
raise Appwrite::Exception.new('Missing required parameter: "status"')
|
933
|
-
end
|
934
|
-
|
935
|
-
.gsub('{userId}', user_id)
|
936
913
|
|
937
914
|
@client.call(
|
938
915
|
method: 'PATCH',
|
@@ -951,8 +928,16 @@ module Appwrite
|
|
951
928
|
#
|
952
929
|
# @return [User]
|
953
930
|
def update_email_verification(user_id:, email_verification:)
|
954
|
-
|
955
931
|
path = '/users/{userId}/verification'
|
932
|
+
.gsub('{userId}', user_id)
|
933
|
+
|
934
|
+
if user_id.nil?
|
935
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
936
|
+
end
|
937
|
+
|
938
|
+
if email_verification.nil?
|
939
|
+
raise Appwrite::Exception.new('Missing required parameter: "emailVerification"')
|
940
|
+
end
|
956
941
|
|
957
942
|
params = {
|
958
943
|
emailVerification: email_verification,
|
@@ -961,15 +946,6 @@ module Appwrite
|
|
961
946
|
headers = {
|
962
947
|
"content-type": 'application/json',
|
963
948
|
}
|
964
|
-
if user_id.nil?
|
965
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
966
|
-
end
|
967
|
-
|
968
|
-
if email_verification.nil?
|
969
|
-
raise Appwrite::Exception.new('Missing required parameter: "emailVerification"')
|
970
|
-
end
|
971
|
-
|
972
|
-
.gsub('{userId}', user_id)
|
973
949
|
|
974
950
|
@client.call(
|
975
951
|
method: 'PATCH',
|
@@ -988,8 +964,16 @@ module Appwrite
|
|
988
964
|
#
|
989
965
|
# @return [User]
|
990
966
|
def update_phone_verification(user_id:, phone_verification:)
|
991
|
-
|
992
967
|
path = '/users/{userId}/verification/phone'
|
968
|
+
.gsub('{userId}', user_id)
|
969
|
+
|
970
|
+
if user_id.nil?
|
971
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
972
|
+
end
|
973
|
+
|
974
|
+
if phone_verification.nil?
|
975
|
+
raise Appwrite::Exception.new('Missing required parameter: "phoneVerification"')
|
976
|
+
end
|
993
977
|
|
994
978
|
params = {
|
995
979
|
phoneVerification: phone_verification,
|
@@ -998,15 +982,6 @@ module Appwrite
|
|
998
982
|
headers = {
|
999
983
|
"content-type": 'application/json',
|
1000
984
|
}
|
1001
|
-
if user_id.nil?
|
1002
|
-
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
1003
|
-
end
|
1004
|
-
|
1005
|
-
if phone_verification.nil?
|
1006
|
-
raise Appwrite::Exception.new('Missing required parameter: "phoneVerification"')
|
1007
|
-
end
|
1008
|
-
|
1009
|
-
.gsub('{userId}', user_id)
|
1010
985
|
|
1011
986
|
@client.call(
|
1012
987
|
method: 'PATCH',
|