appwrite 7.0.0.pre.RC1 → 7.0.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.
- 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 +16 -4
- data/lib/appwrite/services/account.rb +91 -111
- data/lib/appwrite/services/avatars.rb +28 -35
- data/lib/appwrite/services/databases.rb +382 -413
- data/lib/appwrite/services/functions.rb +181 -201
- data/lib/appwrite/services/health.rb +0 -10
- data/lib/appwrite/services/locale.rb +6 -13
- data/lib/appwrite/services/storage.rb +113 -126
- data/lib/appwrite/services/teams.rb +96 -107
- data/lib/appwrite/services/users.rb +236 -261
- metadata +4 -4
@@ -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
|
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
|
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
|
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
|
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
|
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
|
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 = {
|
@@ -39,22 +38,29 @@ module Appwrite
|
|
39
38
|
|
40
39
|
# Create a new storage bucket.
|
41
40
|
#
|
42
|
-
# @param [String] bucket_id Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can
|
41
|
+
# @param [String] bucket_id Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
43
42
|
# @param [String] name Bucket name
|
44
43
|
# @param [Array] permissions An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](/docs/permissions).
|
45
44
|
# @param [] file_security Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](/docs/permissions).
|
46
45
|
# @param [] enabled Is bucket enabled?
|
47
46
|
# @param [Integer] maximum_file_size Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)
|
48
47
|
# @param [Array] allowed_file_extensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
|
49
|
-
# @param [String] compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it
|
50
|
-
# @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it
|
51
|
-
# @param [] antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it
|
48
|
+
# @param [String] compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
49
|
+
# @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
50
|
+
# @param [] antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
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',
|
@@ -131,14 +128,22 @@ module Appwrite
|
|
131
128
|
# @param [] enabled Is bucket enabled?
|
132
129
|
# @param [Integer] maximum_file_size Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)
|
133
130
|
# @param [Array] allowed_file_extensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
|
134
|
-
# @param [String] compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it
|
135
|
-
# @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it
|
136
|
-
# @param [] antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it
|
131
|
+
# @param [String] compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
132
|
+
# @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
133
|
+
# @param [] antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
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',
|
@@ -262,37 +256,36 @@ module Appwrite
|
|
262
256
|
#
|
263
257
|
#
|
264
258
|
# @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
|
265
|
-
# @param [String] file_id File ID. Choose your own unique ID or pass the string
|
259
|
+
# @param [String] file_id File ID. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
266
260
|
# @param [file] file Binary file.
|
267
261
|
# @param [Array] permissions An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](/docs/permissions).
|
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
|
-
|
269
|
+
raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
|
285
270
|
end
|
286
271
|
|
287
272
|
if file_id.nil?
|
288
|
-
|
273
|
+
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
289
274
|
end
|
290
275
|
|
291
276
|
if file.nil?
|
292
|
-
|
277
|
+
raise Appwrite::Exception.new('Missing required parameter: "file"')
|
293
278
|
end
|
294
279
|
|
295
|
-
|
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
|
-
|
318
|
+
raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
|
331
319
|
end
|
332
320
|
|
333
321
|
if file_id.nil?
|
334
|
-
|
322
|
+
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
335
323
|
end
|
336
324
|
|
337
|
-
|
338
|
-
|
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
|
-
|
394
|
+
raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
|
409
395
|
end
|
410
396
|
|
411
397
|
if file_id.nil?
|
412
|
-
|
398
|
+
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
413
399
|
end
|
414
400
|
|
415
|
-
|
416
|
-
|
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
|
-
|
431
|
+
raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
|
447
432
|
end
|
448
433
|
|
449
434
|
if file_id.nil?
|
450
|
-
|
435
|
+
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
451
436
|
end
|
452
437
|
|
453
|
-
|
454
|
-
|
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
|
-
|
529
|
+
raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
|
547
530
|
end
|
548
531
|
|
549
532
|
if file_id.nil?
|
550
|
-
|
533
|
+
raise Appwrite::Exception.new('Missing required parameter: "fileId"')
|
551
534
|
end
|
552
535
|
|
553
|
-
|
554
|
-
|
536
|
+
params = {
|
537
|
+
}
|
538
|
+
|
539
|
+
headers = {
|
540
|
+
"content-type": 'application/json',
|
541
|
+
}
|
555
542
|
|
556
543
|
@client.call(
|
557
544
|
method: 'GET',
|