appwrite 9.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 +3 -3
- data/lib/appwrite/role.rb +56 -0
- data/lib/appwrite/services/account.rb +88 -88
- data/lib/appwrite/services/avatars.rb +28 -28
- data/lib/appwrite/services/databases.rb +168 -168
- data/lib/appwrite/services/functions.rb +84 -84
- data/lib/appwrite/services/graphql.rb +8 -8
- data/lib/appwrite/services/health.rb +48 -48
- data/lib/appwrite/services/locale.rb +32 -32
- data/lib/appwrite/services/storage.rb +52 -52
- data/lib/appwrite/services/teams.rb +52 -52
- data/lib/appwrite/services/users.rb +112 -112
- metadata +2 -2
@@ -17,20 +17,20 @@ module Appwrite
|
|
17
17
|
def list_buckets(queries: nil, search: nil)
|
18
18
|
api_path = '/storage/buckets'
|
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
31
|
path: api_path,
|
32
|
-
headers:
|
33
|
-
params:
|
32
|
+
headers: api_headers,
|
33
|
+
params: api_params,
|
34
34
|
response_type: Models::BucketList
|
35
35
|
)
|
36
36
|
end
|
@@ -61,7 +61,7 @@ module Appwrite
|
|
61
61
|
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
62
62
|
end
|
63
63
|
|
64
|
-
|
64
|
+
api_params = {
|
65
65
|
bucketId: bucket_id,
|
66
66
|
name: name,
|
67
67
|
permissions: permissions,
|
@@ -74,15 +74,15 @@ module Appwrite
|
|
74
74
|
antivirus: antivirus,
|
75
75
|
}
|
76
76
|
|
77
|
-
|
77
|
+
api_headers = {
|
78
78
|
"content-type": 'application/json',
|
79
79
|
}
|
80
80
|
|
81
81
|
@client.call(
|
82
82
|
method: 'POST',
|
83
83
|
path: api_path,
|
84
|
-
headers:
|
85
|
-
params:
|
84
|
+
headers: api_headers,
|
85
|
+
params: api_params,
|
86
86
|
response_type: Models::Bucket
|
87
87
|
)
|
88
88
|
end
|
@@ -102,18 +102,18 @@ module Appwrite
|
|
102
102
|
raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
|
103
103
|
end
|
104
104
|
|
105
|
-
|
105
|
+
api_params = {
|
106
106
|
}
|
107
107
|
|
108
|
-
|
108
|
+
api_headers = {
|
109
109
|
"content-type": 'application/json',
|
110
110
|
}
|
111
111
|
|
112
112
|
@client.call(
|
113
113
|
method: 'GET',
|
114
114
|
path: api_path,
|
115
|
-
headers:
|
116
|
-
params:
|
115
|
+
headers: api_headers,
|
116
|
+
params: api_params,
|
117
117
|
response_type: Models::Bucket
|
118
118
|
)
|
119
119
|
end
|
@@ -145,7 +145,7 @@ module Appwrite
|
|
145
145
|
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
146
146
|
end
|
147
147
|
|
148
|
-
|
148
|
+
api_params = {
|
149
149
|
name: name,
|
150
150
|
permissions: permissions,
|
151
151
|
fileSecurity: file_security,
|
@@ -157,15 +157,15 @@ module Appwrite
|
|
157
157
|
antivirus: antivirus,
|
158
158
|
}
|
159
159
|
|
160
|
-
|
160
|
+
api_headers = {
|
161
161
|
"content-type": 'application/json',
|
162
162
|
}
|
163
163
|
|
164
164
|
@client.call(
|
165
165
|
method: 'PUT',
|
166
166
|
path: api_path,
|
167
|
-
headers:
|
168
|
-
params:
|
167
|
+
headers: api_headers,
|
168
|
+
params: api_params,
|
169
169
|
response_type: Models::Bucket
|
170
170
|
)
|
171
171
|
end
|
@@ -184,18 +184,18 @@ module Appwrite
|
|
184
184
|
raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
|
185
185
|
end
|
186
186
|
|
187
|
-
|
187
|
+
api_params = {
|
188
188
|
}
|
189
189
|
|
190
|
-
|
190
|
+
api_headers = {
|
191
191
|
"content-type": 'application/json',
|
192
192
|
}
|
193
193
|
|
194
194
|
@client.call(
|
195
195
|
method: 'DELETE',
|
196
196
|
path: api_path,
|
197
|
-
headers:
|
198
|
-
params:
|
197
|
+
headers: api_headers,
|
198
|
+
params: api_params,
|
199
199
|
)
|
200
200
|
end
|
201
201
|
|
@@ -216,20 +216,20 @@ module Appwrite
|
|
216
216
|
raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
|
217
217
|
end
|
218
218
|
|
219
|
-
|
219
|
+
api_params = {
|
220
220
|
queries: queries,
|
221
221
|
search: search,
|
222
222
|
}
|
223
223
|
|
224
|
-
|
224
|
+
api_headers = {
|
225
225
|
"content-type": 'application/json',
|
226
226
|
}
|
227
227
|
|
228
228
|
@client.call(
|
229
229
|
method: 'GET',
|
230
230
|
path: api_path,
|
231
|
-
headers:
|
232
|
-
params:
|
231
|
+
headers: api_headers,
|
232
|
+
params: api_params,
|
233
233
|
response_type: Models::FileList
|
234
234
|
)
|
235
235
|
end
|
@@ -276,13 +276,13 @@ module Appwrite
|
|
276
276
|
raise Appwrite::Exception.new('Missing required parameter: "file"')
|
277
277
|
end
|
278
278
|
|
279
|
-
|
279
|
+
api_params = {
|
280
280
|
fileId: file_id,
|
281
281
|
file: file,
|
282
282
|
permissions: permissions,
|
283
283
|
}
|
284
284
|
|
285
|
-
|
285
|
+
api_headers = {
|
286
286
|
"content-type": 'multipart/form-data',
|
287
287
|
}
|
288
288
|
|
@@ -291,8 +291,8 @@ module Appwrite
|
|
291
291
|
|
292
292
|
@client.chunked_upload(
|
293
293
|
path: api_path,
|
294
|
-
headers:
|
295
|
-
params:
|
294
|
+
headers: api_headers,
|
295
|
+
params: api_params,
|
296
296
|
param_name: param_name,
|
297
297
|
id_param_name: id_param_name,
|
298
298
|
on_progress: on_progress,
|
@@ -321,18 +321,18 @@ module Appwrite
|
|
321
321
|
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
322
322
|
end
|
323
323
|
|
324
|
-
|
324
|
+
api_params = {
|
325
325
|
}
|
326
326
|
|
327
|
-
|
327
|
+
api_headers = {
|
328
328
|
"content-type": 'application/json',
|
329
329
|
}
|
330
330
|
|
331
331
|
@client.call(
|
332
332
|
method: 'GET',
|
333
333
|
path: api_path,
|
334
|
-
headers:
|
335
|
-
params:
|
334
|
+
headers: api_headers,
|
335
|
+
params: api_params,
|
336
336
|
response_type: Models::File
|
337
337
|
)
|
338
338
|
end
|
@@ -360,20 +360,20 @@ module Appwrite
|
|
360
360
|
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
361
361
|
end
|
362
362
|
|
363
|
-
|
363
|
+
api_params = {
|
364
364
|
name: name,
|
365
365
|
permissions: permissions,
|
366
366
|
}
|
367
367
|
|
368
|
-
|
368
|
+
api_headers = {
|
369
369
|
"content-type": 'application/json',
|
370
370
|
}
|
371
371
|
|
372
372
|
@client.call(
|
373
373
|
method: 'PUT',
|
374
374
|
path: api_path,
|
375
|
-
headers:
|
376
|
-
params:
|
375
|
+
headers: api_headers,
|
376
|
+
params: api_params,
|
377
377
|
response_type: Models::File
|
378
378
|
)
|
379
379
|
end
|
@@ -399,18 +399,18 @@ module Appwrite
|
|
399
399
|
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
400
400
|
end
|
401
401
|
|
402
|
-
|
402
|
+
api_params = {
|
403
403
|
}
|
404
404
|
|
405
|
-
|
405
|
+
api_headers = {
|
406
406
|
"content-type": 'application/json',
|
407
407
|
}
|
408
408
|
|
409
409
|
@client.call(
|
410
410
|
method: 'DELETE',
|
411
411
|
path: api_path,
|
412
|
-
headers:
|
413
|
-
params:
|
412
|
+
headers: api_headers,
|
413
|
+
params: api_params,
|
414
414
|
)
|
415
415
|
end
|
416
416
|
|
@@ -436,18 +436,18 @@ module Appwrite
|
|
436
436
|
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
437
437
|
end
|
438
438
|
|
439
|
-
|
439
|
+
api_params = {
|
440
440
|
}
|
441
441
|
|
442
|
-
|
442
|
+
api_headers = {
|
443
443
|
"content-type": 'application/json',
|
444
444
|
}
|
445
445
|
|
446
446
|
@client.call(
|
447
447
|
method: 'GET',
|
448
448
|
path: api_path,
|
449
|
-
headers:
|
450
|
-
params:
|
449
|
+
headers: api_headers,
|
450
|
+
params: api_params,
|
451
451
|
)
|
452
452
|
end
|
453
453
|
|
@@ -486,7 +486,7 @@ module Appwrite
|
|
486
486
|
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
487
487
|
end
|
488
488
|
|
489
|
-
|
489
|
+
api_params = {
|
490
490
|
width: width,
|
491
491
|
height: height,
|
492
492
|
gravity: gravity,
|
@@ -500,15 +500,15 @@ module Appwrite
|
|
500
500
|
output: output,
|
501
501
|
}
|
502
502
|
|
503
|
-
|
503
|
+
api_headers = {
|
504
504
|
"content-type": 'application/json',
|
505
505
|
}
|
506
506
|
|
507
507
|
@client.call(
|
508
508
|
method: 'GET',
|
509
509
|
path: api_path,
|
510
|
-
headers:
|
511
|
-
params:
|
510
|
+
headers: api_headers,
|
511
|
+
params: api_params,
|
512
512
|
)
|
513
513
|
end
|
514
514
|
|
@@ -534,18 +534,18 @@ module Appwrite
|
|
534
534
|
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
535
535
|
end
|
536
536
|
|
537
|
-
|
537
|
+
api_params = {
|
538
538
|
}
|
539
539
|
|
540
|
-
|
540
|
+
api_headers = {
|
541
541
|
"content-type": 'application/json',
|
542
542
|
}
|
543
543
|
|
544
544
|
@client.call(
|
545
545
|
method: 'GET',
|
546
546
|
path: api_path,
|
547
|
-
headers:
|
548
|
-
params:
|
547
|
+
headers: api_headers,
|
548
|
+
params: api_params,
|
549
549
|
)
|
550
550
|
end
|
551
551
|
|
@@ -17,20 +17,20 @@ module Appwrite
|
|
17
17
|
def list(queries: nil, search: nil)
|
18
18
|
api_path = '/teams'
|
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
31
|
path: api_path,
|
32
|
-
headers:
|
33
|
-
params:
|
32
|
+
headers: api_headers,
|
33
|
+
params: api_params,
|
34
34
|
response_type: Models::TeamList
|
35
35
|
)
|
36
36
|
end
|
@@ -56,21 +56,21 @@ module Appwrite
|
|
56
56
|
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
57
57
|
end
|
58
58
|
|
59
|
-
|
59
|
+
api_params = {
|
60
60
|
teamId: team_id,
|
61
61
|
name: name,
|
62
62
|
roles: roles,
|
63
63
|
}
|
64
64
|
|
65
|
-
|
65
|
+
api_headers = {
|
66
66
|
"content-type": 'application/json',
|
67
67
|
}
|
68
68
|
|
69
69
|
@client.call(
|
70
70
|
method: 'POST',
|
71
71
|
path: api_path,
|
72
|
-
headers:
|
73
|
-
params:
|
72
|
+
headers: api_headers,
|
73
|
+
params: api_params,
|
74
74
|
response_type: Models::Team
|
75
75
|
)
|
76
76
|
end
|
@@ -89,18 +89,18 @@ module Appwrite
|
|
89
89
|
raise Appwrite::Exception.new('Missing required parameter: "teamId"')
|
90
90
|
end
|
91
91
|
|
92
|
-
|
92
|
+
api_params = {
|
93
93
|
}
|
94
94
|
|
95
|
-
|
95
|
+
api_headers = {
|
96
96
|
"content-type": 'application/json',
|
97
97
|
}
|
98
98
|
|
99
99
|
@client.call(
|
100
100
|
method: 'GET',
|
101
101
|
path: api_path,
|
102
|
-
headers:
|
103
|
-
params:
|
102
|
+
headers: api_headers,
|
103
|
+
params: api_params,
|
104
104
|
response_type: Models::Team
|
105
105
|
)
|
106
106
|
end
|
@@ -124,19 +124,19 @@ module Appwrite
|
|
124
124
|
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
125
125
|
end
|
126
126
|
|
127
|
-
|
127
|
+
api_params = {
|
128
128
|
name: name,
|
129
129
|
}
|
130
130
|
|
131
|
-
|
131
|
+
api_headers = {
|
132
132
|
"content-type": 'application/json',
|
133
133
|
}
|
134
134
|
|
135
135
|
@client.call(
|
136
136
|
method: 'PUT',
|
137
137
|
path: api_path,
|
138
|
-
headers:
|
139
|
-
params:
|
138
|
+
headers: api_headers,
|
139
|
+
params: api_params,
|
140
140
|
response_type: Models::Team
|
141
141
|
)
|
142
142
|
end
|
@@ -156,18 +156,18 @@ module Appwrite
|
|
156
156
|
raise Appwrite::Exception.new('Missing required parameter: "teamId"')
|
157
157
|
end
|
158
158
|
|
159
|
-
|
159
|
+
api_params = {
|
160
160
|
}
|
161
161
|
|
162
|
-
|
162
|
+
api_headers = {
|
163
163
|
"content-type": 'application/json',
|
164
164
|
}
|
165
165
|
|
166
166
|
@client.call(
|
167
167
|
method: 'DELETE',
|
168
168
|
path: api_path,
|
169
|
-
headers:
|
170
|
-
params:
|
169
|
+
headers: api_headers,
|
170
|
+
params: api_params,
|
171
171
|
)
|
172
172
|
end
|
173
173
|
|
@@ -188,20 +188,20 @@ module Appwrite
|
|
188
188
|
raise Appwrite::Exception.new('Missing required parameter: "teamId"')
|
189
189
|
end
|
190
190
|
|
191
|
-
|
191
|
+
api_params = {
|
192
192
|
queries: queries,
|
193
193
|
search: search,
|
194
194
|
}
|
195
195
|
|
196
|
-
|
196
|
+
api_headers = {
|
197
197
|
"content-type": 'application/json',
|
198
198
|
}
|
199
199
|
|
200
200
|
@client.call(
|
201
201
|
method: 'GET',
|
202
202
|
path: api_path,
|
203
|
-
headers:
|
204
|
-
params:
|
203
|
+
headers: api_headers,
|
204
|
+
params: api_params,
|
205
205
|
response_type: Models::MembershipList
|
206
206
|
)
|
207
207
|
end
|
@@ -254,7 +254,7 @@ module Appwrite
|
|
254
254
|
raise Appwrite::Exception.new('Missing required parameter: "url"')
|
255
255
|
end
|
256
256
|
|
257
|
-
|
257
|
+
api_params = {
|
258
258
|
email: email,
|
259
259
|
userId: user_id,
|
260
260
|
phone: phone,
|
@@ -263,15 +263,15 @@ module Appwrite
|
|
263
263
|
name: name,
|
264
264
|
}
|
265
265
|
|
266
|
-
|
266
|
+
api_headers = {
|
267
267
|
"content-type": 'application/json',
|
268
268
|
}
|
269
269
|
|
270
270
|
@client.call(
|
271
271
|
method: 'POST',
|
272
272
|
path: api_path,
|
273
|
-
headers:
|
274
|
-
params:
|
273
|
+
headers: api_headers,
|
274
|
+
params: api_params,
|
275
275
|
response_type: Models::Membership
|
276
276
|
)
|
277
277
|
end
|
@@ -297,18 +297,18 @@ module Appwrite
|
|
297
297
|
raise Appwrite::Exception.new('Missing required parameter: "membershipId"')
|
298
298
|
end
|
299
299
|
|
300
|
-
|
300
|
+
api_params = {
|
301
301
|
}
|
302
302
|
|
303
|
-
|
303
|
+
api_headers = {
|
304
304
|
"content-type": 'application/json',
|
305
305
|
}
|
306
306
|
|
307
307
|
@client.call(
|
308
308
|
method: 'GET',
|
309
309
|
path: api_path,
|
310
|
-
headers:
|
311
|
-
params:
|
310
|
+
headers: api_headers,
|
311
|
+
params: api_params,
|
312
312
|
response_type: Models::Membership
|
313
313
|
)
|
314
314
|
end
|
@@ -341,19 +341,19 @@ module Appwrite
|
|
341
341
|
raise Appwrite::Exception.new('Missing required parameter: "roles"')
|
342
342
|
end
|
343
343
|
|
344
|
-
|
344
|
+
api_params = {
|
345
345
|
roles: roles,
|
346
346
|
}
|
347
347
|
|
348
|
-
|
348
|
+
api_headers = {
|
349
349
|
"content-type": 'application/json',
|
350
350
|
}
|
351
351
|
|
352
352
|
@client.call(
|
353
353
|
method: 'PATCH',
|
354
354
|
path: api_path,
|
355
|
-
headers:
|
356
|
-
params:
|
355
|
+
headers: api_headers,
|
356
|
+
params: api_params,
|
357
357
|
response_type: Models::Membership
|
358
358
|
)
|
359
359
|
end
|
@@ -380,18 +380,18 @@ module Appwrite
|
|
380
380
|
raise Appwrite::Exception.new('Missing required parameter: "membershipId"')
|
381
381
|
end
|
382
382
|
|
383
|
-
|
383
|
+
api_params = {
|
384
384
|
}
|
385
385
|
|
386
|
-
|
386
|
+
api_headers = {
|
387
387
|
"content-type": 'application/json',
|
388
388
|
}
|
389
389
|
|
390
390
|
@client.call(
|
391
391
|
method: 'DELETE',
|
392
392
|
path: api_path,
|
393
|
-
headers:
|
394
|
-
params:
|
393
|
+
headers: api_headers,
|
394
|
+
params: api_params,
|
395
395
|
)
|
396
396
|
end
|
397
397
|
|
@@ -431,20 +431,20 @@ module Appwrite
|
|
431
431
|
raise Appwrite::Exception.new('Missing required parameter: "secret"')
|
432
432
|
end
|
433
433
|
|
434
|
-
|
434
|
+
api_params = {
|
435
435
|
userId: user_id,
|
436
436
|
secret: secret,
|
437
437
|
}
|
438
438
|
|
439
|
-
|
439
|
+
api_headers = {
|
440
440
|
"content-type": 'application/json',
|
441
441
|
}
|
442
442
|
|
443
443
|
@client.call(
|
444
444
|
method: 'PATCH',
|
445
445
|
path: api_path,
|
446
|
-
headers:
|
447
|
-
params:
|
446
|
+
headers: api_headers,
|
447
|
+
params: api_params,
|
448
448
|
response_type: Models::Membership
|
449
449
|
)
|
450
450
|
end
|
@@ -465,18 +465,18 @@ module Appwrite
|
|
465
465
|
raise Appwrite::Exception.new('Missing required parameter: "teamId"')
|
466
466
|
end
|
467
467
|
|
468
|
-
|
468
|
+
api_params = {
|
469
469
|
}
|
470
470
|
|
471
|
-
|
471
|
+
api_headers = {
|
472
472
|
"content-type": 'application/json',
|
473
473
|
}
|
474
474
|
|
475
475
|
@client.call(
|
476
476
|
method: 'GET',
|
477
477
|
path: api_path,
|
478
|
-
headers:
|
479
|
-
params:
|
478
|
+
headers: api_headers,
|
479
|
+
params: api_params,
|
480
480
|
response_type: Models::Preferences
|
481
481
|
)
|
482
482
|
end
|
@@ -502,19 +502,19 @@ module Appwrite
|
|
502
502
|
raise Appwrite::Exception.new('Missing required parameter: "prefs"')
|
503
503
|
end
|
504
504
|
|
505
|
-
|
505
|
+
api_params = {
|
506
506
|
prefs: prefs,
|
507
507
|
}
|
508
508
|
|
509
|
-
|
509
|
+
api_headers = {
|
510
510
|
"content-type": 'application/json',
|
511
511
|
}
|
512
512
|
|
513
513
|
@client.call(
|
514
514
|
method: 'PUT',
|
515
515
|
path: api_path,
|
516
|
-
headers:
|
517
|
-
params:
|
516
|
+
headers: api_headers,
|
517
|
+
params: api_params,
|
518
518
|
response_type: Models::Preferences
|
519
519
|
)
|
520
520
|
end
|