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
@@ -15,22 +15,22 @@ module Appwrite
|
|
15
15
|
#
|
16
16
|
# @return [UserList]
|
17
17
|
def list(queries: nil, search: nil)
|
18
|
-
|
18
|
+
api_path = '/users'
|
19
19
|
|
20
|
-
|
20
|
+
api_params = {
|
21
21
|
queries: queries,
|
22
22
|
search: search,
|
23
23
|
}
|
24
24
|
|
25
|
-
|
25
|
+
api_headers = {
|
26
26
|
"content-type": 'application/json',
|
27
27
|
}
|
28
28
|
|
29
29
|
@client.call(
|
30
30
|
method: 'GET',
|
31
|
-
path:
|
32
|
-
headers:
|
33
|
-
params:
|
31
|
+
path: api_path,
|
32
|
+
headers: api_headers,
|
33
|
+
params: api_params,
|
34
34
|
response_type: Models::UserList
|
35
35
|
)
|
36
36
|
end
|
@@ -46,13 +46,13 @@ module Appwrite
|
|
46
46
|
#
|
47
47
|
# @return [User]
|
48
48
|
def create(user_id:, email: nil, phone: nil, password: nil, name: nil)
|
49
|
-
|
49
|
+
api_path = '/users'
|
50
50
|
|
51
51
|
if user_id.nil?
|
52
52
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
53
53
|
end
|
54
54
|
|
55
|
-
|
55
|
+
api_params = {
|
56
56
|
userId: user_id,
|
57
57
|
email: email,
|
58
58
|
phone: phone,
|
@@ -60,15 +60,15 @@ module Appwrite
|
|
60
60
|
name: name,
|
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: 'POST',
|
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
|
@@ -86,7 +86,7 @@ module Appwrite
|
|
86
86
|
#
|
87
87
|
# @return [User]
|
88
88
|
def create_argon2_user(user_id:, email:, password:, name: nil)
|
89
|
-
|
89
|
+
api_path = '/users/argon2'
|
90
90
|
|
91
91
|
if user_id.nil?
|
92
92
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -100,22 +100,22 @@ module Appwrite
|
|
100
100
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
101
101
|
end
|
102
102
|
|
103
|
-
|
103
|
+
api_params = {
|
104
104
|
userId: user_id,
|
105
105
|
email: email,
|
106
106
|
password: password,
|
107
107
|
name: name,
|
108
108
|
}
|
109
109
|
|
110
|
-
|
110
|
+
api_headers = {
|
111
111
|
"content-type": 'application/json',
|
112
112
|
}
|
113
113
|
|
114
114
|
@client.call(
|
115
115
|
method: 'POST',
|
116
|
-
path:
|
117
|
-
headers:
|
118
|
-
params:
|
116
|
+
path: api_path,
|
117
|
+
headers: api_headers,
|
118
|
+
params: api_params,
|
119
119
|
response_type: Models::User
|
120
120
|
)
|
121
121
|
end
|
@@ -133,7 +133,7 @@ module Appwrite
|
|
133
133
|
#
|
134
134
|
# @return [User]
|
135
135
|
def create_bcrypt_user(user_id:, email:, password:, name: nil)
|
136
|
-
|
136
|
+
api_path = '/users/bcrypt'
|
137
137
|
|
138
138
|
if user_id.nil?
|
139
139
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -147,27 +147,84 @@ module Appwrite
|
|
147
147
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
148
148
|
end
|
149
149
|
|
150
|
-
|
150
|
+
api_params = {
|
151
151
|
userId: user_id,
|
152
152
|
email: email,
|
153
153
|
password: password,
|
154
154
|
name: name,
|
155
155
|
}
|
156
156
|
|
157
|
-
|
157
|
+
api_headers = {
|
158
158
|
"content-type": 'application/json',
|
159
159
|
}
|
160
160
|
|
161
161
|
@client.call(
|
162
162
|
method: 'POST',
|
163
|
-
path:
|
164
|
-
headers:
|
165
|
-
params:
|
163
|
+
path: api_path,
|
164
|
+
headers: api_headers,
|
165
|
+
params: api_params,
|
166
166
|
response_type: Models::User
|
167
167
|
)
|
168
168
|
end
|
169
169
|
|
170
170
|
|
171
|
+
# Get identities for all users.
|
172
|
+
#
|
173
|
+
# @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
|
174
|
+
# @param [String] search Search term to filter your list results. Max length: 256 chars.
|
175
|
+
#
|
176
|
+
# @return [IdentityList]
|
177
|
+
def list_identities(queries: nil, search: nil)
|
178
|
+
api_path = '/users/identities'
|
179
|
+
|
180
|
+
api_params = {
|
181
|
+
queries: queries,
|
182
|
+
search: search,
|
183
|
+
}
|
184
|
+
|
185
|
+
api_headers = {
|
186
|
+
"content-type": 'application/json',
|
187
|
+
}
|
188
|
+
|
189
|
+
@client.call(
|
190
|
+
method: 'GET',
|
191
|
+
path: api_path,
|
192
|
+
headers: api_headers,
|
193
|
+
params: api_params,
|
194
|
+
response_type: Models::IdentityList
|
195
|
+
)
|
196
|
+
end
|
197
|
+
|
198
|
+
|
199
|
+
# Delete an identity by its unique ID.
|
200
|
+
#
|
201
|
+
# @param [String] identity_id Identity ID.
|
202
|
+
#
|
203
|
+
# @return []
|
204
|
+
def delete_identity(identity_id:)
|
205
|
+
api_path = '/users/identities/{identityId}'
|
206
|
+
.gsub('{identityId}', identity_id)
|
207
|
+
|
208
|
+
if identity_id.nil?
|
209
|
+
raise Appwrite::Exception.new('Missing required parameter: "identityId"')
|
210
|
+
end
|
211
|
+
|
212
|
+
api_params = {
|
213
|
+
}
|
214
|
+
|
215
|
+
api_headers = {
|
216
|
+
"content-type": 'application/json',
|
217
|
+
}
|
218
|
+
|
219
|
+
@client.call(
|
220
|
+
method: 'DELETE',
|
221
|
+
path: api_path,
|
222
|
+
headers: api_headers,
|
223
|
+
params: api_params,
|
224
|
+
)
|
225
|
+
end
|
226
|
+
|
227
|
+
|
171
228
|
# Create a new user. Password provided must be hashed with the
|
172
229
|
# [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST
|
173
230
|
# /users](/docs/server/users#usersCreate) endpoint to create users with a
|
@@ -180,7 +237,7 @@ module Appwrite
|
|
180
237
|
#
|
181
238
|
# @return [User]
|
182
239
|
def create_md5_user(user_id:, email:, password:, name: nil)
|
183
|
-
|
240
|
+
api_path = '/users/md5'
|
184
241
|
|
185
242
|
if user_id.nil?
|
186
243
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -194,22 +251,22 @@ module Appwrite
|
|
194
251
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
195
252
|
end
|
196
253
|
|
197
|
-
|
254
|
+
api_params = {
|
198
255
|
userId: user_id,
|
199
256
|
email: email,
|
200
257
|
password: password,
|
201
258
|
name: name,
|
202
259
|
}
|
203
260
|
|
204
|
-
|
261
|
+
api_headers = {
|
205
262
|
"content-type": 'application/json',
|
206
263
|
}
|
207
264
|
|
208
265
|
@client.call(
|
209
266
|
method: 'POST',
|
210
|
-
path:
|
211
|
-
headers:
|
212
|
-
params:
|
267
|
+
path: api_path,
|
268
|
+
headers: api_headers,
|
269
|
+
params: api_params,
|
213
270
|
response_type: Models::User
|
214
271
|
)
|
215
272
|
end
|
@@ -227,7 +284,7 @@ module Appwrite
|
|
227
284
|
#
|
228
285
|
# @return [User]
|
229
286
|
def create_ph_pass_user(user_id:, email:, password:, name: nil)
|
230
|
-
|
287
|
+
api_path = '/users/phpass'
|
231
288
|
|
232
289
|
if user_id.nil?
|
233
290
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -241,22 +298,22 @@ module Appwrite
|
|
241
298
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
242
299
|
end
|
243
300
|
|
244
|
-
|
301
|
+
api_params = {
|
245
302
|
userId: user_id,
|
246
303
|
email: email,
|
247
304
|
password: password,
|
248
305
|
name: name,
|
249
306
|
}
|
250
307
|
|
251
|
-
|
308
|
+
api_headers = {
|
252
309
|
"content-type": 'application/json',
|
253
310
|
}
|
254
311
|
|
255
312
|
@client.call(
|
256
313
|
method: 'POST',
|
257
|
-
path:
|
258
|
-
headers:
|
259
|
-
params:
|
314
|
+
path: api_path,
|
315
|
+
headers: api_headers,
|
316
|
+
params: api_params,
|
260
317
|
response_type: Models::User
|
261
318
|
)
|
262
319
|
end
|
@@ -279,7 +336,7 @@ module Appwrite
|
|
279
336
|
#
|
280
337
|
# @return [User]
|
281
338
|
def create_scrypt_user(user_id:, email:, password:, password_salt:, password_cpu:, password_memory:, password_parallel:, password_length:, name: nil)
|
282
|
-
|
339
|
+
api_path = '/users/scrypt'
|
283
340
|
|
284
341
|
if user_id.nil?
|
285
342
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -313,7 +370,7 @@ module Appwrite
|
|
313
370
|
raise Appwrite::Exception.new('Missing required parameter: "passwordLength"')
|
314
371
|
end
|
315
372
|
|
316
|
-
|
373
|
+
api_params = {
|
317
374
|
userId: user_id,
|
318
375
|
email: email,
|
319
376
|
password: password,
|
@@ -325,15 +382,15 @@ module Appwrite
|
|
325
382
|
name: name,
|
326
383
|
}
|
327
384
|
|
328
|
-
|
385
|
+
api_headers = {
|
329
386
|
"content-type": 'application/json',
|
330
387
|
}
|
331
388
|
|
332
389
|
@client.call(
|
333
390
|
method: 'POST',
|
334
|
-
path:
|
335
|
-
headers:
|
336
|
-
params:
|
391
|
+
path: api_path,
|
392
|
+
headers: api_headers,
|
393
|
+
params: api_params,
|
337
394
|
response_type: Models::User
|
338
395
|
)
|
339
396
|
end
|
@@ -354,7 +411,7 @@ module Appwrite
|
|
354
411
|
#
|
355
412
|
# @return [User]
|
356
413
|
def create_scrypt_modified_user(user_id:, email:, password:, password_salt:, password_salt_separator:, password_signer_key:, name: nil)
|
357
|
-
|
414
|
+
api_path = '/users/scrypt-modified'
|
358
415
|
|
359
416
|
if user_id.nil?
|
360
417
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -380,7 +437,7 @@ module Appwrite
|
|
380
437
|
raise Appwrite::Exception.new('Missing required parameter: "passwordSignerKey"')
|
381
438
|
end
|
382
439
|
|
383
|
-
|
440
|
+
api_params = {
|
384
441
|
userId: user_id,
|
385
442
|
email: email,
|
386
443
|
password: password,
|
@@ -390,15 +447,15 @@ module Appwrite
|
|
390
447
|
name: name,
|
391
448
|
}
|
392
449
|
|
393
|
-
|
450
|
+
api_headers = {
|
394
451
|
"content-type": 'application/json',
|
395
452
|
}
|
396
453
|
|
397
454
|
@client.call(
|
398
455
|
method: 'POST',
|
399
|
-
path:
|
400
|
-
headers:
|
401
|
-
params:
|
456
|
+
path: api_path,
|
457
|
+
headers: api_headers,
|
458
|
+
params: api_params,
|
402
459
|
response_type: Models::User
|
403
460
|
)
|
404
461
|
end
|
@@ -417,7 +474,7 @@ module Appwrite
|
|
417
474
|
#
|
418
475
|
# @return [User]
|
419
476
|
def create_sha_user(user_id:, email:, password:, password_version: nil, name: nil)
|
420
|
-
|
477
|
+
api_path = '/users/sha'
|
421
478
|
|
422
479
|
if user_id.nil?
|
423
480
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -431,7 +488,7 @@ module Appwrite
|
|
431
488
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
432
489
|
end
|
433
490
|
|
434
|
-
|
491
|
+
api_params = {
|
435
492
|
userId: user_id,
|
436
493
|
email: email,
|
437
494
|
password: password,
|
@@ -439,15 +496,15 @@ module Appwrite
|
|
439
496
|
name: name,
|
440
497
|
}
|
441
498
|
|
442
|
-
|
499
|
+
api_headers = {
|
443
500
|
"content-type": 'application/json',
|
444
501
|
}
|
445
502
|
|
446
503
|
@client.call(
|
447
504
|
method: 'POST',
|
448
|
-
path:
|
449
|
-
headers:
|
450
|
-
params:
|
505
|
+
path: api_path,
|
506
|
+
headers: api_headers,
|
507
|
+
params: api_params,
|
451
508
|
response_type: Models::User
|
452
509
|
)
|
453
510
|
end
|
@@ -459,25 +516,25 @@ module Appwrite
|
|
459
516
|
#
|
460
517
|
# @return [User]
|
461
518
|
def get(user_id:)
|
462
|
-
|
519
|
+
api_path = '/users/{userId}'
|
463
520
|
.gsub('{userId}', user_id)
|
464
521
|
|
465
522
|
if user_id.nil?
|
466
523
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
467
524
|
end
|
468
525
|
|
469
|
-
|
526
|
+
api_params = {
|
470
527
|
}
|
471
528
|
|
472
|
-
|
529
|
+
api_headers = {
|
473
530
|
"content-type": 'application/json',
|
474
531
|
}
|
475
532
|
|
476
533
|
@client.call(
|
477
534
|
method: 'GET',
|
478
|
-
path:
|
479
|
-
headers:
|
480
|
-
params:
|
535
|
+
path: api_path,
|
536
|
+
headers: api_headers,
|
537
|
+
params: api_params,
|
481
538
|
response_type: Models::User
|
482
539
|
)
|
483
540
|
end
|
@@ -493,25 +550,25 @@ module Appwrite
|
|
493
550
|
#
|
494
551
|
# @return []
|
495
552
|
def delete(user_id:)
|
496
|
-
|
553
|
+
api_path = '/users/{userId}'
|
497
554
|
.gsub('{userId}', user_id)
|
498
555
|
|
499
556
|
if user_id.nil?
|
500
557
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
501
558
|
end
|
502
559
|
|
503
|
-
|
560
|
+
api_params = {
|
504
561
|
}
|
505
562
|
|
506
|
-
|
563
|
+
api_headers = {
|
507
564
|
"content-type": 'application/json',
|
508
565
|
}
|
509
566
|
|
510
567
|
@client.call(
|
511
568
|
method: 'DELETE',
|
512
|
-
path:
|
513
|
-
headers:
|
514
|
-
params:
|
569
|
+
path: api_path,
|
570
|
+
headers: api_headers,
|
571
|
+
params: api_params,
|
515
572
|
)
|
516
573
|
end
|
517
574
|
|
@@ -523,7 +580,7 @@ module Appwrite
|
|
523
580
|
#
|
524
581
|
# @return [User]
|
525
582
|
def update_email(user_id:, email:)
|
526
|
-
|
583
|
+
api_path = '/users/{userId}/email'
|
527
584
|
.gsub('{userId}', user_id)
|
528
585
|
|
529
586
|
if user_id.nil?
|
@@ -534,19 +591,60 @@ module Appwrite
|
|
534
591
|
raise Appwrite::Exception.new('Missing required parameter: "email"')
|
535
592
|
end
|
536
593
|
|
537
|
-
|
594
|
+
api_params = {
|
538
595
|
email: email,
|
539
596
|
}
|
540
597
|
|
541
|
-
|
598
|
+
api_headers = {
|
542
599
|
"content-type": 'application/json',
|
543
600
|
}
|
544
601
|
|
545
602
|
@client.call(
|
546
603
|
method: 'PATCH',
|
547
|
-
path:
|
548
|
-
headers:
|
549
|
-
params:
|
604
|
+
path: api_path,
|
605
|
+
headers: api_headers,
|
606
|
+
params: api_params,
|
607
|
+
response_type: Models::User
|
608
|
+
)
|
609
|
+
end
|
610
|
+
|
611
|
+
|
612
|
+
# Update the user labels by its unique ID.
|
613
|
+
#
|
614
|
+
# Labels can be used to grant access to resources. While teams are a way for
|
615
|
+
# user's to share access to a resource, labels can be defined by the
|
616
|
+
# developer to grant access without an invitation. See the [Permissions
|
617
|
+
# docs](/docs/permissions) for more info.
|
618
|
+
#
|
619
|
+
# @param [String] user_id User ID.
|
620
|
+
# @param [Array] labels Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long.
|
621
|
+
#
|
622
|
+
# @return [User]
|
623
|
+
def update_labels(user_id:, labels:)
|
624
|
+
api_path = '/users/{userId}/labels'
|
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 labels.nil?
|
632
|
+
raise Appwrite::Exception.new('Missing required parameter: "labels"')
|
633
|
+
end
|
634
|
+
|
635
|
+
api_params = {
|
636
|
+
labels: labels,
|
637
|
+
}
|
638
|
+
|
639
|
+
api_headers = {
|
640
|
+
"content-type": 'application/json',
|
641
|
+
}
|
642
|
+
|
643
|
+
@client.call(
|
644
|
+
method: 'PUT',
|
645
|
+
path: api_path,
|
646
|
+
headers: api_headers,
|
647
|
+
params: api_params,
|
550
648
|
response_type: Models::User
|
551
649
|
)
|
552
650
|
end
|
@@ -559,26 +657,26 @@ module Appwrite
|
|
559
657
|
#
|
560
658
|
# @return [LogList]
|
561
659
|
def list_logs(user_id:, queries: nil)
|
562
|
-
|
660
|
+
api_path = '/users/{userId}/logs'
|
563
661
|
.gsub('{userId}', user_id)
|
564
662
|
|
565
663
|
if user_id.nil?
|
566
664
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
567
665
|
end
|
568
666
|
|
569
|
-
|
667
|
+
api_params = {
|
570
668
|
queries: queries,
|
571
669
|
}
|
572
670
|
|
573
|
-
|
671
|
+
api_headers = {
|
574
672
|
"content-type": 'application/json',
|
575
673
|
}
|
576
674
|
|
577
675
|
@client.call(
|
578
676
|
method: 'GET',
|
579
|
-
path:
|
580
|
-
headers:
|
581
|
-
params:
|
677
|
+
path: api_path,
|
678
|
+
headers: api_headers,
|
679
|
+
params: api_params,
|
582
680
|
response_type: Models::LogList
|
583
681
|
)
|
584
682
|
end
|
@@ -590,25 +688,25 @@ module Appwrite
|
|
590
688
|
#
|
591
689
|
# @return [MembershipList]
|
592
690
|
def list_memberships(user_id:)
|
593
|
-
|
691
|
+
api_path = '/users/{userId}/memberships'
|
594
692
|
.gsub('{userId}', user_id)
|
595
693
|
|
596
694
|
if user_id.nil?
|
597
695
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
598
696
|
end
|
599
697
|
|
600
|
-
|
698
|
+
api_params = {
|
601
699
|
}
|
602
700
|
|
603
|
-
|
701
|
+
api_headers = {
|
604
702
|
"content-type": 'application/json',
|
605
703
|
}
|
606
704
|
|
607
705
|
@client.call(
|
608
706
|
method: 'GET',
|
609
|
-
path:
|
610
|
-
headers:
|
611
|
-
params:
|
707
|
+
path: api_path,
|
708
|
+
headers: api_headers,
|
709
|
+
params: api_params,
|
612
710
|
response_type: Models::MembershipList
|
613
711
|
)
|
614
712
|
end
|
@@ -621,7 +719,7 @@ module Appwrite
|
|
621
719
|
#
|
622
720
|
# @return [User]
|
623
721
|
def update_name(user_id:, name:)
|
624
|
-
|
722
|
+
api_path = '/users/{userId}/name'
|
625
723
|
.gsub('{userId}', user_id)
|
626
724
|
|
627
725
|
if user_id.nil?
|
@@ -632,19 +730,19 @@ module Appwrite
|
|
632
730
|
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
633
731
|
end
|
634
732
|
|
635
|
-
|
733
|
+
api_params = {
|
636
734
|
name: name,
|
637
735
|
}
|
638
736
|
|
639
|
-
|
737
|
+
api_headers = {
|
640
738
|
"content-type": 'application/json',
|
641
739
|
}
|
642
740
|
|
643
741
|
@client.call(
|
644
742
|
method: 'PATCH',
|
645
|
-
path:
|
646
|
-
headers:
|
647
|
-
params:
|
743
|
+
path: api_path,
|
744
|
+
headers: api_headers,
|
745
|
+
params: api_params,
|
648
746
|
response_type: Models::User
|
649
747
|
)
|
650
748
|
end
|
@@ -657,7 +755,7 @@ module Appwrite
|
|
657
755
|
#
|
658
756
|
# @return [User]
|
659
757
|
def update_password(user_id:, password:)
|
660
|
-
|
758
|
+
api_path = '/users/{userId}/password'
|
661
759
|
.gsub('{userId}', user_id)
|
662
760
|
|
663
761
|
if user_id.nil?
|
@@ -668,19 +766,19 @@ module Appwrite
|
|
668
766
|
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
669
767
|
end
|
670
768
|
|
671
|
-
|
769
|
+
api_params = {
|
672
770
|
password: password,
|
673
771
|
}
|
674
772
|
|
675
|
-
|
773
|
+
api_headers = {
|
676
774
|
"content-type": 'application/json',
|
677
775
|
}
|
678
776
|
|
679
777
|
@client.call(
|
680
778
|
method: 'PATCH',
|
681
|
-
path:
|
682
|
-
headers:
|
683
|
-
params:
|
779
|
+
path: api_path,
|
780
|
+
headers: api_headers,
|
781
|
+
params: api_params,
|
684
782
|
response_type: Models::User
|
685
783
|
)
|
686
784
|
end
|
@@ -693,7 +791,7 @@ module Appwrite
|
|
693
791
|
#
|
694
792
|
# @return [User]
|
695
793
|
def update_phone(user_id:, number:)
|
696
|
-
|
794
|
+
api_path = '/users/{userId}/phone'
|
697
795
|
.gsub('{userId}', user_id)
|
698
796
|
|
699
797
|
if user_id.nil?
|
@@ -704,19 +802,19 @@ module Appwrite
|
|
704
802
|
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
705
803
|
end
|
706
804
|
|
707
|
-
|
805
|
+
api_params = {
|
708
806
|
number: number,
|
709
807
|
}
|
710
808
|
|
711
|
-
|
809
|
+
api_headers = {
|
712
810
|
"content-type": 'application/json',
|
713
811
|
}
|
714
812
|
|
715
813
|
@client.call(
|
716
814
|
method: 'PATCH',
|
717
|
-
path:
|
718
|
-
headers:
|
719
|
-
params:
|
815
|
+
path: api_path,
|
816
|
+
headers: api_headers,
|
817
|
+
params: api_params,
|
720
818
|
response_type: Models::User
|
721
819
|
)
|
722
820
|
end
|
@@ -728,25 +826,25 @@ module Appwrite
|
|
728
826
|
#
|
729
827
|
# @return [Preferences]
|
730
828
|
def get_prefs(user_id:)
|
731
|
-
|
829
|
+
api_path = '/users/{userId}/prefs'
|
732
830
|
.gsub('{userId}', user_id)
|
733
831
|
|
734
832
|
if user_id.nil?
|
735
833
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
736
834
|
end
|
737
835
|
|
738
|
-
|
836
|
+
api_params = {
|
739
837
|
}
|
740
838
|
|
741
|
-
|
839
|
+
api_headers = {
|
742
840
|
"content-type": 'application/json',
|
743
841
|
}
|
744
842
|
|
745
843
|
@client.call(
|
746
844
|
method: 'GET',
|
747
|
-
path:
|
748
|
-
headers:
|
749
|
-
params:
|
845
|
+
path: api_path,
|
846
|
+
headers: api_headers,
|
847
|
+
params: api_params,
|
750
848
|
response_type: Models::Preferences
|
751
849
|
)
|
752
850
|
end
|
@@ -761,7 +859,7 @@ module Appwrite
|
|
761
859
|
#
|
762
860
|
# @return [Preferences]
|
763
861
|
def update_prefs(user_id:, prefs:)
|
764
|
-
|
862
|
+
api_path = '/users/{userId}/prefs'
|
765
863
|
.gsub('{userId}', user_id)
|
766
864
|
|
767
865
|
if user_id.nil?
|
@@ -772,19 +870,19 @@ module Appwrite
|
|
772
870
|
raise Appwrite::Exception.new('Missing required parameter: "prefs"')
|
773
871
|
end
|
774
872
|
|
775
|
-
|
873
|
+
api_params = {
|
776
874
|
prefs: prefs,
|
777
875
|
}
|
778
876
|
|
779
|
-
|
877
|
+
api_headers = {
|
780
878
|
"content-type": 'application/json',
|
781
879
|
}
|
782
880
|
|
783
881
|
@client.call(
|
784
882
|
method: 'PATCH',
|
785
|
-
path:
|
786
|
-
headers:
|
787
|
-
params:
|
883
|
+
path: api_path,
|
884
|
+
headers: api_headers,
|
885
|
+
params: api_params,
|
788
886
|
response_type: Models::Preferences
|
789
887
|
)
|
790
888
|
end
|
@@ -796,25 +894,25 @@ module Appwrite
|
|
796
894
|
#
|
797
895
|
# @return [SessionList]
|
798
896
|
def list_sessions(user_id:)
|
799
|
-
|
897
|
+
api_path = '/users/{userId}/sessions'
|
800
898
|
.gsub('{userId}', user_id)
|
801
899
|
|
802
900
|
if user_id.nil?
|
803
901
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
804
902
|
end
|
805
903
|
|
806
|
-
|
904
|
+
api_params = {
|
807
905
|
}
|
808
906
|
|
809
|
-
|
907
|
+
api_headers = {
|
810
908
|
"content-type": 'application/json',
|
811
909
|
}
|
812
910
|
|
813
911
|
@client.call(
|
814
912
|
method: 'GET',
|
815
|
-
path:
|
816
|
-
headers:
|
817
|
-
params:
|
913
|
+
path: api_path,
|
914
|
+
headers: api_headers,
|
915
|
+
params: api_params,
|
818
916
|
response_type: Models::SessionList
|
819
917
|
)
|
820
918
|
end
|
@@ -826,25 +924,25 @@ module Appwrite
|
|
826
924
|
#
|
827
925
|
# @return []
|
828
926
|
def delete_sessions(user_id:)
|
829
|
-
|
927
|
+
api_path = '/users/{userId}/sessions'
|
830
928
|
.gsub('{userId}', user_id)
|
831
929
|
|
832
930
|
if user_id.nil?
|
833
931
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
834
932
|
end
|
835
933
|
|
836
|
-
|
934
|
+
api_params = {
|
837
935
|
}
|
838
936
|
|
839
|
-
|
937
|
+
api_headers = {
|
840
938
|
"content-type": 'application/json',
|
841
939
|
}
|
842
940
|
|
843
941
|
@client.call(
|
844
942
|
method: 'DELETE',
|
845
|
-
path:
|
846
|
-
headers:
|
847
|
-
params:
|
943
|
+
path: api_path,
|
944
|
+
headers: api_headers,
|
945
|
+
params: api_params,
|
848
946
|
)
|
849
947
|
end
|
850
948
|
|
@@ -856,7 +954,7 @@ module Appwrite
|
|
856
954
|
#
|
857
955
|
# @return []
|
858
956
|
def delete_session(user_id:, session_id:)
|
859
|
-
|
957
|
+
api_path = '/users/{userId}/sessions/{sessionId}'
|
860
958
|
.gsub('{userId}', user_id)
|
861
959
|
.gsub('{sessionId}', session_id)
|
862
960
|
|
@@ -868,18 +966,18 @@ module Appwrite
|
|
868
966
|
raise Appwrite::Exception.new('Missing required parameter: "sessionId"')
|
869
967
|
end
|
870
968
|
|
871
|
-
|
969
|
+
api_params = {
|
872
970
|
}
|
873
971
|
|
874
|
-
|
972
|
+
api_headers = {
|
875
973
|
"content-type": 'application/json',
|
876
974
|
}
|
877
975
|
|
878
976
|
@client.call(
|
879
977
|
method: 'DELETE',
|
880
|
-
path:
|
881
|
-
headers:
|
882
|
-
params:
|
978
|
+
path: api_path,
|
979
|
+
headers: api_headers,
|
980
|
+
params: api_params,
|
883
981
|
)
|
884
982
|
end
|
885
983
|
|
@@ -892,7 +990,7 @@ module Appwrite
|
|
892
990
|
#
|
893
991
|
# @return [User]
|
894
992
|
def update_status(user_id:, status:)
|
895
|
-
|
993
|
+
api_path = '/users/{userId}/status'
|
896
994
|
.gsub('{userId}', user_id)
|
897
995
|
|
898
996
|
if user_id.nil?
|
@@ -903,19 +1001,19 @@ module Appwrite
|
|
903
1001
|
raise Appwrite::Exception.new('Missing required parameter: "status"')
|
904
1002
|
end
|
905
1003
|
|
906
|
-
|
1004
|
+
api_params = {
|
907
1005
|
status: status,
|
908
1006
|
}
|
909
1007
|
|
910
|
-
|
1008
|
+
api_headers = {
|
911
1009
|
"content-type": 'application/json',
|
912
1010
|
}
|
913
1011
|
|
914
1012
|
@client.call(
|
915
1013
|
method: 'PATCH',
|
916
|
-
path:
|
917
|
-
headers:
|
918
|
-
params:
|
1014
|
+
path: api_path,
|
1015
|
+
headers: api_headers,
|
1016
|
+
params: api_params,
|
919
1017
|
response_type: Models::User
|
920
1018
|
)
|
921
1019
|
end
|
@@ -928,7 +1026,7 @@ module Appwrite
|
|
928
1026
|
#
|
929
1027
|
# @return [User]
|
930
1028
|
def update_email_verification(user_id:, email_verification:)
|
931
|
-
|
1029
|
+
api_path = '/users/{userId}/verification'
|
932
1030
|
.gsub('{userId}', user_id)
|
933
1031
|
|
934
1032
|
if user_id.nil?
|
@@ -939,19 +1037,19 @@ module Appwrite
|
|
939
1037
|
raise Appwrite::Exception.new('Missing required parameter: "emailVerification"')
|
940
1038
|
end
|
941
1039
|
|
942
|
-
|
1040
|
+
api_params = {
|
943
1041
|
emailVerification: email_verification,
|
944
1042
|
}
|
945
1043
|
|
946
|
-
|
1044
|
+
api_headers = {
|
947
1045
|
"content-type": 'application/json',
|
948
1046
|
}
|
949
1047
|
|
950
1048
|
@client.call(
|
951
1049
|
method: 'PATCH',
|
952
|
-
path:
|
953
|
-
headers:
|
954
|
-
params:
|
1050
|
+
path: api_path,
|
1051
|
+
headers: api_headers,
|
1052
|
+
params: api_params,
|
955
1053
|
response_type: Models::User
|
956
1054
|
)
|
957
1055
|
end
|
@@ -964,7 +1062,7 @@ module Appwrite
|
|
964
1062
|
#
|
965
1063
|
# @return [User]
|
966
1064
|
def update_phone_verification(user_id:, phone_verification:)
|
967
|
-
|
1065
|
+
api_path = '/users/{userId}/verification/phone'
|
968
1066
|
.gsub('{userId}', user_id)
|
969
1067
|
|
970
1068
|
if user_id.nil?
|
@@ -975,19 +1073,19 @@ module Appwrite
|
|
975
1073
|
raise Appwrite::Exception.new('Missing required parameter: "phoneVerification"')
|
976
1074
|
end
|
977
1075
|
|
978
|
-
|
1076
|
+
api_params = {
|
979
1077
|
phoneVerification: phone_verification,
|
980
1078
|
}
|
981
1079
|
|
982
|
-
|
1080
|
+
api_headers = {
|
983
1081
|
"content-type": 'application/json',
|
984
1082
|
}
|
985
1083
|
|
986
1084
|
@client.call(
|
987
1085
|
method: 'PATCH',
|
988
|
-
path:
|
989
|
-
headers:
|
990
|
-
params:
|
1086
|
+
path: api_path,
|
1087
|
+
headers: api_headers,
|
1088
|
+
params: api_params,
|
991
1089
|
response_type: Models::User
|
992
1090
|
)
|
993
1091
|
end
|