appwrite 7.0.0.pre.RC2 → 7.1.0

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.
@@ -12,7 +12,6 @@ module Appwrite
12
12
  #
13
13
  # @return [HealthStatus]
14
14
  def get()
15
-
16
15
  path = '/health'
17
16
 
18
17
  params = {
@@ -37,7 +36,6 @@ module Appwrite
37
36
  #
38
37
  # @return [HealthAntivirus]
39
38
  def get_antivirus()
40
-
41
39
  path = '/health/anti-virus'
42
40
 
43
41
  params = {
@@ -63,7 +61,6 @@ module Appwrite
63
61
  #
64
62
  # @return [HealthStatus]
65
63
  def get_cache()
66
-
67
64
  path = '/health/cache'
68
65
 
69
66
  params = {
@@ -88,7 +85,6 @@ module Appwrite
88
85
  #
89
86
  # @return [HealthStatus]
90
87
  def get_db()
91
-
92
88
  path = '/health/db'
93
89
 
94
90
  params = {
@@ -115,7 +111,6 @@ module Appwrite
115
111
  #
116
112
  # @return [HealthQueue]
117
113
  def get_queue_certificates()
118
-
119
114
  path = '/health/queue/certificates'
120
115
 
121
116
  params = {
@@ -140,7 +135,6 @@ module Appwrite
140
135
  #
141
136
  # @return [HealthQueue]
142
137
  def get_queue_functions()
143
-
144
138
  path = '/health/queue/functions'
145
139
 
146
140
  params = {
@@ -166,7 +160,6 @@ module Appwrite
166
160
  #
167
161
  # @return [HealthQueue]
168
162
  def get_queue_logs()
169
-
170
163
  path = '/health/queue/logs'
171
164
 
172
165
  params = {
@@ -192,7 +185,6 @@ module Appwrite
192
185
  #
193
186
  # @return [HealthQueue]
194
187
  def get_queue_webhooks()
195
-
196
188
  path = '/health/queue/webhooks'
197
189
 
198
190
  params = {
@@ -217,7 +209,6 @@ module Appwrite
217
209
  #
218
210
  # @return [HealthStatus]
219
211
  def get_storage_local()
220
-
221
212
  path = '/health/storage/local'
222
213
 
223
214
  params = {
@@ -248,7 +239,6 @@ module Appwrite
248
239
  #
249
240
  # @return [HealthTime]
250
241
  def get_time()
251
-
252
242
  path = '/health/time'
253
243
 
254
244
  params = {
@@ -17,7 +17,6 @@ module Appwrite
17
17
  #
18
18
  # @return [Locale]
19
19
  def get()
20
-
21
20
  path = '/locale'
22
21
 
23
22
  params = {
@@ -42,8 +41,7 @@ module Appwrite
42
41
  #
43
42
  #
44
43
  # @return [ContinentList]
45
- def get_continents()
46
-
44
+ def list_continents()
47
45
  path = '/locale/continents'
48
46
 
49
47
  params = {
@@ -68,8 +66,7 @@ module Appwrite
68
66
  #
69
67
  #
70
68
  # @return [CountryList]
71
- def get_countries()
72
-
69
+ def list_countries()
73
70
  path = '/locale/countries'
74
71
 
75
72
  params = {
@@ -94,8 +91,7 @@ module Appwrite
94
91
  #
95
92
  #
96
93
  # @return [CountryList]
97
- def get_countries_eu()
98
-
94
+ def list_countries_eu()
99
95
  path = '/locale/countries/eu'
100
96
 
101
97
  params = {
@@ -120,8 +116,7 @@ module Appwrite
120
116
  #
121
117
  #
122
118
  # @return [PhoneList]
123
- def get_countries_phones()
124
-
119
+ def list_countries_phones()
125
120
  path = '/locale/countries/phones'
126
121
 
127
122
  params = {
@@ -147,8 +142,7 @@ module Appwrite
147
142
  #
148
143
  #
149
144
  # @return [CurrencyList]
150
- def get_currencies()
151
-
145
+ def list_currencies()
152
146
  path = '/locale/currencies'
153
147
 
154
148
  params = {
@@ -173,8 +167,7 @@ module Appwrite
173
167
  #
174
168
  #
175
169
  # @return [LanguageList]
176
- def get_languages()
177
-
170
+ def list_languages()
178
171
  path = '/locale/languages'
179
172
 
180
173
  params = {
@@ -15,7 +15,6 @@ module Appwrite
15
15
  #
16
16
  # @return [BucketList]
17
17
  def list_buckets(queries: nil, search: nil)
18
-
19
18
  path = '/storage/buckets'
20
19
 
21
20
  params = {
@@ -52,9 +51,16 @@ module Appwrite
52
51
  #
53
52
  # @return [Bucket]
54
53
  def create_bucket(bucket_id:, name:, permissions: nil, file_security: nil, enabled: nil, maximum_file_size: nil, allowed_file_extensions: nil, compression: nil, encryption: nil, antivirus: nil)
55
-
56
54
  path = '/storage/buckets'
57
55
 
56
+ if bucket_id.nil?
57
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
58
+ end
59
+
60
+ if name.nil?
61
+ raise Appwrite::Exception.new('Missing required parameter: "name"')
62
+ end
63
+
58
64
  params = {
59
65
  bucketId: bucket_id,
60
66
  name: name,
@@ -71,14 +77,6 @@ module Appwrite
71
77
  headers = {
72
78
  "content-type": 'application/json',
73
79
  }
74
- if bucket_id.nil?
75
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
76
- end
77
-
78
- if name.nil?
79
- raise Appwrite::Exception.new('Missing required parameter: "name"')
80
- end
81
-
82
80
 
83
81
  @client.call(
84
82
  method: 'POST',
@@ -97,8 +95,12 @@ module Appwrite
97
95
  #
98
96
  # @return [Bucket]
99
97
  def get_bucket(bucket_id:)
100
-
101
98
  path = '/storage/buckets/{bucketId}'
99
+ .gsub('{bucketId}', bucket_id)
100
+
101
+ if bucket_id.nil?
102
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
103
+ end
102
104
 
103
105
  params = {
104
106
  }
@@ -106,11 +108,6 @@ module Appwrite
106
108
  headers = {
107
109
  "content-type": 'application/json',
108
110
  }
109
- if bucket_id.nil?
110
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
111
- end
112
-
113
- .gsub('{bucketId}', bucket_id)
114
111
 
115
112
  @client.call(
116
113
  method: 'GET',
@@ -137,8 +134,16 @@ module Appwrite
137
134
  #
138
135
  # @return [Bucket]
139
136
  def update_bucket(bucket_id:, name:, permissions: nil, file_security: nil, enabled: nil, maximum_file_size: nil, allowed_file_extensions: nil, compression: nil, encryption: nil, antivirus: nil)
140
-
141
137
  path = '/storage/buckets/{bucketId}'
138
+ .gsub('{bucketId}', bucket_id)
139
+
140
+ if bucket_id.nil?
141
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
142
+ end
143
+
144
+ if name.nil?
145
+ raise Appwrite::Exception.new('Missing required parameter: "name"')
146
+ end
142
147
 
143
148
  params = {
144
149
  name: name,
@@ -155,15 +160,6 @@ module Appwrite
155
160
  headers = {
156
161
  "content-type": 'application/json',
157
162
  }
158
- if bucket_id.nil?
159
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
160
- end
161
-
162
- if name.nil?
163
- raise Appwrite::Exception.new('Missing required parameter: "name"')
164
- end
165
-
166
- .gsub('{bucketId}', bucket_id)
167
163
 
168
164
  @client.call(
169
165
  method: 'PUT',
@@ -181,8 +177,12 @@ module Appwrite
181
177
  #
182
178
  # @return []
183
179
  def delete_bucket(bucket_id:)
184
-
185
180
  path = '/storage/buckets/{bucketId}'
181
+ .gsub('{bucketId}', bucket_id)
182
+
183
+ if bucket_id.nil?
184
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
185
+ end
186
186
 
187
187
  params = {
188
188
  }
@@ -190,11 +190,6 @@ module Appwrite
190
190
  headers = {
191
191
  "content-type": 'application/json',
192
192
  }
193
- if bucket_id.nil?
194
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
195
- end
196
-
197
- .gsub('{bucketId}', bucket_id)
198
193
 
199
194
  @client.call(
200
195
  method: 'DELETE',
@@ -215,8 +210,12 @@ module Appwrite
215
210
  #
216
211
  # @return [FileList]
217
212
  def list_files(bucket_id:, queries: nil, search: nil)
218
-
219
213
  path = '/storage/buckets/{bucketId}/files'
214
+ .gsub('{bucketId}', bucket_id)
215
+
216
+ if bucket_id.nil?
217
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
218
+ end
220
219
 
221
220
  params = {
222
221
  queries: queries,
@@ -226,11 +225,6 @@ module Appwrite
226
225
  headers = {
227
226
  "content-type": 'application/json',
228
227
  }
229
- if bucket_id.nil?
230
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
231
- end
232
-
233
- .gsub('{bucketId}', bucket_id)
234
228
 
235
229
  @client.call(
236
230
  method: 'GET',
@@ -268,31 +262,30 @@ module Appwrite
268
262
  #
269
263
  # @return [File]
270
264
  def create_file(bucket_id:, file_id:, file:, permissions: nil, on_progress: nil)
271
-
272
265
  path = '/storage/buckets/{bucketId}/files'
266
+ .gsub('{bucketId}', bucket_id)
273
267
 
274
- params = {
275
- fileId: file_id,
276
- file: file,
277
- permissions: permissions,
278
- }
279
-
280
- headers = {
281
- "content-type": 'multipart/form-data',
282
- }
283
268
  if bucket_id.nil?
284
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
269
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
285
270
  end
286
271
 
287
272
  if file_id.nil?
288
- raise Appwrite::Exception.new('Missing required parameter: "fileId"')
273
+ raise Appwrite::Exception.new('Missing required parameter: "fileId"')
289
274
  end
290
275
 
291
276
  if file.nil?
292
- raise Appwrite::Exception.new('Missing required parameter: "file"')
277
+ raise Appwrite::Exception.new('Missing required parameter: "file"')
293
278
  end
294
279
 
295
- .gsub('{bucketId}', bucket_id)
280
+ params = {
281
+ fileId: file_id,
282
+ file: file,
283
+ permissions: permissions,
284
+ }
285
+
286
+ headers = {
287
+ "content-type": 'multipart/form-data',
288
+ }
296
289
 
297
290
  id_param_name = "fileId"
298
291
  param_name = 'file'
@@ -317,25 +310,24 @@ module Appwrite
317
310
  #
318
311
  # @return [File]
319
312
  def get_file(bucket_id:, file_id:)
320
-
321
313
  path = '/storage/buckets/{bucketId}/files/{fileId}'
314
+ .gsub('{bucketId}', bucket_id)
315
+ .gsub('{fileId}', file_id)
322
316
 
323
- params = {
324
- }
325
-
326
- headers = {
327
- "content-type": 'application/json',
328
- }
329
317
  if bucket_id.nil?
330
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
318
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
331
319
  end
332
320
 
333
321
  if file_id.nil?
334
- raise Appwrite::Exception.new('Missing required parameter: "fileId"')
322
+ raise Appwrite::Exception.new('Missing required parameter: "fileId"')
335
323
  end
336
324
 
337
- .gsub('{bucketId}', bucket_id)
338
- .gsub('{fileId}', file_id)
325
+ params = {
326
+ }
327
+
328
+ headers = {
329
+ "content-type": 'application/json',
330
+ }
339
331
 
340
332
  @client.call(
341
333
  method: 'GET',
@@ -356,8 +348,17 @@ module Appwrite
356
348
  #
357
349
  # @return [File]
358
350
  def update_file(bucket_id:, file_id:, permissions: nil)
359
-
360
351
  path = '/storage/buckets/{bucketId}/files/{fileId}'
352
+ .gsub('{bucketId}', bucket_id)
353
+ .gsub('{fileId}', file_id)
354
+
355
+ if bucket_id.nil?
356
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
357
+ end
358
+
359
+ if file_id.nil?
360
+ raise Appwrite::Exception.new('Missing required parameter: "fileId"')
361
+ end
361
362
 
362
363
  params = {
363
364
  permissions: permissions,
@@ -366,16 +367,6 @@ module Appwrite
366
367
  headers = {
367
368
  "content-type": 'application/json',
368
369
  }
369
- if bucket_id.nil?
370
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
371
- end
372
-
373
- if file_id.nil?
374
- raise Appwrite::Exception.new('Missing required parameter: "fileId"')
375
- end
376
-
377
- .gsub('{bucketId}', bucket_id)
378
- .gsub('{fileId}', file_id)
379
370
 
380
371
  @client.call(
381
372
  method: 'PUT',
@@ -395,25 +386,24 @@ module Appwrite
395
386
  #
396
387
  # @return []
397
388
  def delete_file(bucket_id:, file_id:)
398
-
399
389
  path = '/storage/buckets/{bucketId}/files/{fileId}'
390
+ .gsub('{bucketId}', bucket_id)
391
+ .gsub('{fileId}', file_id)
400
392
 
401
- params = {
402
- }
403
-
404
- headers = {
405
- "content-type": 'application/json',
406
- }
407
393
  if bucket_id.nil?
408
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
394
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
409
395
  end
410
396
 
411
397
  if file_id.nil?
412
- raise Appwrite::Exception.new('Missing required parameter: "fileId"')
398
+ raise Appwrite::Exception.new('Missing required parameter: "fileId"')
413
399
  end
414
400
 
415
- .gsub('{bucketId}', bucket_id)
416
- .gsub('{fileId}', file_id)
401
+ params = {
402
+ }
403
+
404
+ headers = {
405
+ "content-type": 'application/json',
406
+ }
417
407
 
418
408
  @client.call(
419
409
  method: 'DELETE',
@@ -433,25 +423,24 @@ module Appwrite
433
423
  #
434
424
  # @return []
435
425
  def get_file_download(bucket_id:, file_id:)
436
-
437
426
  path = '/storage/buckets/{bucketId}/files/{fileId}/download'
427
+ .gsub('{bucketId}', bucket_id)
428
+ .gsub('{fileId}', file_id)
438
429
 
439
- params = {
440
- }
441
-
442
- headers = {
443
- "content-type": 'application/json',
444
- }
445
430
  if bucket_id.nil?
446
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
431
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
447
432
  end
448
433
 
449
434
  if file_id.nil?
450
- raise Appwrite::Exception.new('Missing required parameter: "fileId"')
435
+ raise Appwrite::Exception.new('Missing required parameter: "fileId"')
451
436
  end
452
437
 
453
- .gsub('{bucketId}', bucket_id)
454
- .gsub('{fileId}', file_id)
438
+ params = {
439
+ }
440
+
441
+ headers = {
442
+ "content-type": 'application/json',
443
+ }
455
444
 
456
445
  @client.call(
457
446
  method: 'GET',
@@ -484,8 +473,17 @@ module Appwrite
484
473
  #
485
474
  # @return []
486
475
  def get_file_preview(bucket_id:, file_id:, width: nil, height: nil, gravity: nil, quality: nil, border_width: nil, border_color: nil, border_radius: nil, opacity: nil, rotation: nil, background: nil, output: nil)
487
-
488
476
  path = '/storage/buckets/{bucketId}/files/{fileId}/preview'
477
+ .gsub('{bucketId}', bucket_id)
478
+ .gsub('{fileId}', file_id)
479
+
480
+ if bucket_id.nil?
481
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
482
+ end
483
+
484
+ if file_id.nil?
485
+ raise Appwrite::Exception.new('Missing required parameter: "fileId"')
486
+ end
489
487
 
490
488
  params = {
491
489
  width: width,
@@ -504,16 +502,6 @@ module Appwrite
504
502
  headers = {
505
503
  "content-type": 'application/json',
506
504
  }
507
- if bucket_id.nil?
508
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
509
- end
510
-
511
- if file_id.nil?
512
- raise Appwrite::Exception.new('Missing required parameter: "fileId"')
513
- end
514
-
515
- .gsub('{bucketId}', bucket_id)
516
- .gsub('{fileId}', file_id)
517
505
 
518
506
  @client.call(
519
507
  method: 'GET',
@@ -533,25 +521,24 @@ module Appwrite
533
521
  #
534
522
  # @return []
535
523
  def get_file_view(bucket_id:, file_id:)
536
-
537
524
  path = '/storage/buckets/{bucketId}/files/{fileId}/view'
525
+ .gsub('{bucketId}', bucket_id)
526
+ .gsub('{fileId}', file_id)
538
527
 
539
- params = {
540
- }
541
-
542
- headers = {
543
- "content-type": 'application/json',
544
- }
545
528
  if bucket_id.nil?
546
- raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
529
+ raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
547
530
  end
548
531
 
549
532
  if file_id.nil?
550
- raise Appwrite::Exception.new('Missing required parameter: "fileId"')
533
+ raise Appwrite::Exception.new('Missing required parameter: "fileId"')
551
534
  end
552
535
 
553
- .gsub('{bucketId}', bucket_id)
554
- .gsub('{fileId}', file_id)
536
+ params = {
537
+ }
538
+
539
+ headers = {
540
+ "content-type": 'application/json',
541
+ }
555
542
 
556
543
  @client.call(
557
544
  method: 'GET',