appwrite 8.0.0 → 9.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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +2 -2
  3. data/lib/appwrite/models/attribute_boolean.rb +5 -0
  4. data/lib/appwrite/models/attribute_datetime.rb +5 -0
  5. data/lib/appwrite/models/attribute_email.rb +5 -0
  6. data/lib/appwrite/models/attribute_enum.rb +5 -0
  7. data/lib/appwrite/models/attribute_float.rb +5 -0
  8. data/lib/appwrite/models/attribute_integer.rb +5 -0
  9. data/lib/appwrite/models/attribute_ip.rb +5 -0
  10. data/lib/appwrite/models/attribute_relationship.rb +5 -0
  11. data/lib/appwrite/models/attribute_string.rb +5 -0
  12. data/lib/appwrite/models/attribute_url.rb +5 -0
  13. data/lib/appwrite/models/database.rb +8 -3
  14. data/lib/appwrite/models/deployment.rb +63 -13
  15. data/lib/appwrite/models/execution.rb +40 -20
  16. data/lib/appwrite/models/function.rb +53 -13
  17. data/lib/appwrite/models/headers.rb +32 -0
  18. data/lib/appwrite/models/health_status.rb +5 -0
  19. data/lib/appwrite/models/identity.rb +72 -0
  20. data/lib/appwrite/models/identity_list.rb +32 -0
  21. data/lib/appwrite/models/index.rb +5 -0
  22. data/lib/appwrite/models/locale_code.rb +32 -0
  23. data/lib/appwrite/models/locale_code_list.rb +32 -0
  24. data/lib/appwrite/models/user.rb +13 -3
  25. data/lib/appwrite/models/variable.rb +10 -5
  26. data/lib/appwrite/services/account.rb +105 -50
  27. data/lib/appwrite/services/avatars.rb +14 -14
  28. data/lib/appwrite/services/databases.rb +106 -94
  29. data/lib/appwrite/services/functions.rb +149 -63
  30. data/lib/appwrite/services/graphql.rb +4 -4
  31. data/lib/appwrite/services/health.rb +71 -22
  32. data/lib/appwrite/services/locale.rb +39 -14
  33. data/lib/appwrite/services/storage.rb +33 -31
  34. data/lib/appwrite/services/teams.rb +28 -27
  35. data/lib/appwrite/services/users.rb +148 -50
  36. data/lib/appwrite.rb +5 -0
  37. metadata +7 -2
@@ -12,7 +12,7 @@ module Appwrite
12
12
  #
13
13
  # @return [HealthStatus]
14
14
  def get()
15
- path = '/health'
15
+ api_path = '/health'
16
16
 
17
17
  params = {
18
18
  }
@@ -23,7 +23,7 @@ module Appwrite
23
23
 
24
24
  @client.call(
25
25
  method: 'GET',
26
- path: path,
26
+ path: api_path,
27
27
  headers: headers,
28
28
  params: params,
29
29
  response_type: Models::HealthStatus
@@ -36,7 +36,7 @@ module Appwrite
36
36
  #
37
37
  # @return [HealthAntivirus]
38
38
  def get_antivirus()
39
- path = '/health/anti-virus'
39
+ api_path = '/health/anti-virus'
40
40
 
41
41
  params = {
42
42
  }
@@ -47,7 +47,7 @@ module Appwrite
47
47
 
48
48
  @client.call(
49
49
  method: 'GET',
50
- path: path,
50
+ path: api_path,
51
51
  headers: headers,
52
52
  params: params,
53
53
  response_type: Models::HealthAntivirus
@@ -55,13 +55,13 @@ module Appwrite
55
55
  end
56
56
 
57
57
 
58
- # Check the Appwrite in-memory cache server is up and connection is
58
+ # Check the Appwrite in-memory cache servers are up and connection is
59
59
  # successful.
60
60
  #
61
61
  #
62
62
  # @return [HealthStatus]
63
63
  def get_cache()
64
- path = '/health/cache'
64
+ api_path = '/health/cache'
65
65
 
66
66
  params = {
67
67
  }
@@ -72,7 +72,7 @@ module Appwrite
72
72
 
73
73
  @client.call(
74
74
  method: 'GET',
75
- path: path,
75
+ path: api_path,
76
76
  headers: headers,
77
77
  params: params,
78
78
  response_type: Models::HealthStatus
@@ -80,12 +80,12 @@ module Appwrite
80
80
  end
81
81
 
82
82
 
83
- # Check the Appwrite database server is up and connection is successful.
83
+ # Check the Appwrite database servers are up and connection is successful.
84
84
  #
85
85
  #
86
86
  # @return [HealthStatus]
87
87
  def get_db()
88
- path = '/health/db'
88
+ api_path = '/health/db'
89
89
 
90
90
  params = {
91
91
  }
@@ -96,7 +96,56 @@ module Appwrite
96
96
 
97
97
  @client.call(
98
98
  method: 'GET',
99
- path: path,
99
+ path: api_path,
100
+ headers: headers,
101
+ params: params,
102
+ response_type: Models::HealthStatus
103
+ )
104
+ end
105
+
106
+
107
+ # Check the Appwrite pub-sub servers are up and connection is successful.
108
+ #
109
+ #
110
+ # @return [HealthStatus]
111
+ def get_pub_sub()
112
+ api_path = '/health/pubsub'
113
+
114
+ params = {
115
+ }
116
+
117
+ headers = {
118
+ "content-type": 'application/json',
119
+ }
120
+
121
+ @client.call(
122
+ method: 'GET',
123
+ path: api_path,
124
+ headers: headers,
125
+ params: params,
126
+ response_type: Models::HealthStatus
127
+ )
128
+ end
129
+
130
+
131
+ # Check the Appwrite queue messaging servers are up and connection is
132
+ # successful.
133
+ #
134
+ #
135
+ # @return [HealthStatus]
136
+ def get_queue()
137
+ api_path = '/health/queue'
138
+
139
+ params = {
140
+ }
141
+
142
+ headers = {
143
+ "content-type": 'application/json',
144
+ }
145
+
146
+ @client.call(
147
+ method: 'GET',
148
+ path: api_path,
100
149
  headers: headers,
101
150
  params: params,
102
151
  response_type: Models::HealthStatus
@@ -111,7 +160,7 @@ module Appwrite
111
160
  #
112
161
  # @return [HealthQueue]
113
162
  def get_queue_certificates()
114
- path = '/health/queue/certificates'
163
+ api_path = '/health/queue/certificates'
115
164
 
116
165
  params = {
117
166
  }
@@ -122,7 +171,7 @@ module Appwrite
122
171
 
123
172
  @client.call(
124
173
  method: 'GET',
125
- path: path,
174
+ path: api_path,
126
175
  headers: headers,
127
176
  params: params,
128
177
  response_type: Models::HealthQueue
@@ -135,7 +184,7 @@ module Appwrite
135
184
  #
136
185
  # @return [HealthQueue]
137
186
  def get_queue_functions()
138
- path = '/health/queue/functions'
187
+ api_path = '/health/queue/functions'
139
188
 
140
189
  params = {
141
190
  }
@@ -146,7 +195,7 @@ module Appwrite
146
195
 
147
196
  @client.call(
148
197
  method: 'GET',
149
- path: path,
198
+ path: api_path,
150
199
  headers: headers,
151
200
  params: params,
152
201
  response_type: Models::HealthQueue
@@ -160,7 +209,7 @@ module Appwrite
160
209
  #
161
210
  # @return [HealthQueue]
162
211
  def get_queue_logs()
163
- path = '/health/queue/logs'
212
+ api_path = '/health/queue/logs'
164
213
 
165
214
  params = {
166
215
  }
@@ -171,7 +220,7 @@ module Appwrite
171
220
 
172
221
  @client.call(
173
222
  method: 'GET',
174
- path: path,
223
+ path: api_path,
175
224
  headers: headers,
176
225
  params: params,
177
226
  response_type: Models::HealthQueue
@@ -185,7 +234,7 @@ module Appwrite
185
234
  #
186
235
  # @return [HealthQueue]
187
236
  def get_queue_webhooks()
188
- path = '/health/queue/webhooks'
237
+ api_path = '/health/queue/webhooks'
189
238
 
190
239
  params = {
191
240
  }
@@ -196,7 +245,7 @@ module Appwrite
196
245
 
197
246
  @client.call(
198
247
  method: 'GET',
199
- path: path,
248
+ path: api_path,
200
249
  headers: headers,
201
250
  params: params,
202
251
  response_type: Models::HealthQueue
@@ -209,7 +258,7 @@ module Appwrite
209
258
  #
210
259
  # @return [HealthStatus]
211
260
  def get_storage_local()
212
- path = '/health/storage/local'
261
+ api_path = '/health/storage/local'
213
262
 
214
263
  params = {
215
264
  }
@@ -220,7 +269,7 @@ module Appwrite
220
269
 
221
270
  @client.call(
222
271
  method: 'GET',
223
- path: path,
272
+ path: api_path,
224
273
  headers: headers,
225
274
  params: params,
226
275
  response_type: Models::HealthStatus
@@ -239,7 +288,7 @@ module Appwrite
239
288
  #
240
289
  # @return [HealthTime]
241
290
  def get_time()
242
- path = '/health/time'
291
+ api_path = '/health/time'
243
292
 
244
293
  params = {
245
294
  }
@@ -250,7 +299,7 @@ module Appwrite
250
299
 
251
300
  @client.call(
252
301
  method: 'GET',
253
- path: path,
302
+ path: api_path,
254
303
  headers: headers,
255
304
  params: params,
256
305
  response_type: Models::HealthTime
@@ -17,7 +17,7 @@ module Appwrite
17
17
  #
18
18
  # @return [Locale]
19
19
  def get()
20
- path = '/locale'
20
+ api_path = '/locale'
21
21
 
22
22
  params = {
23
23
  }
@@ -28,7 +28,7 @@ module Appwrite
28
28
 
29
29
  @client.call(
30
30
  method: 'GET',
31
- path: path,
31
+ path: api_path,
32
32
  headers: headers,
33
33
  params: params,
34
34
  response_type: Models::Locale
@@ -36,13 +36,38 @@ module Appwrite
36
36
  end
37
37
 
38
38
 
39
+ # List of all locale codes in [ISO
40
+ # 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
41
+ #
42
+ #
43
+ # @return [LocaleCodeList]
44
+ def list_codes()
45
+ api_path = '/locale/codes'
46
+
47
+ params = {
48
+ }
49
+
50
+ headers = {
51
+ "content-type": 'application/json',
52
+ }
53
+
54
+ @client.call(
55
+ method: 'GET',
56
+ path: api_path,
57
+ headers: headers,
58
+ params: params,
59
+ response_type: Models::LocaleCodeList
60
+ )
61
+ end
62
+
63
+
39
64
  # List of all continents. You can use the locale header to get the data in a
40
65
  # supported language.
41
66
  #
42
67
  #
43
68
  # @return [ContinentList]
44
69
  def list_continents()
45
- path = '/locale/continents'
70
+ api_path = '/locale/continents'
46
71
 
47
72
  params = {
48
73
  }
@@ -53,7 +78,7 @@ module Appwrite
53
78
 
54
79
  @client.call(
55
80
  method: 'GET',
56
- path: path,
81
+ path: api_path,
57
82
  headers: headers,
58
83
  params: params,
59
84
  response_type: Models::ContinentList
@@ -67,7 +92,7 @@ module Appwrite
67
92
  #
68
93
  # @return [CountryList]
69
94
  def list_countries()
70
- path = '/locale/countries'
95
+ api_path = '/locale/countries'
71
96
 
72
97
  params = {
73
98
  }
@@ -78,7 +103,7 @@ module Appwrite
78
103
 
79
104
  @client.call(
80
105
  method: 'GET',
81
- path: path,
106
+ path: api_path,
82
107
  headers: headers,
83
108
  params: params,
84
109
  response_type: Models::CountryList
@@ -92,7 +117,7 @@ module Appwrite
92
117
  #
93
118
  # @return [CountryList]
94
119
  def list_countries_eu()
95
- path = '/locale/countries/eu'
120
+ api_path = '/locale/countries/eu'
96
121
 
97
122
  params = {
98
123
  }
@@ -103,7 +128,7 @@ module Appwrite
103
128
 
104
129
  @client.call(
105
130
  method: 'GET',
106
- path: path,
131
+ path: api_path,
107
132
  headers: headers,
108
133
  params: params,
109
134
  response_type: Models::CountryList
@@ -117,7 +142,7 @@ module Appwrite
117
142
  #
118
143
  # @return [PhoneList]
119
144
  def list_countries_phones()
120
- path = '/locale/countries/phones'
145
+ api_path = '/locale/countries/phones'
121
146
 
122
147
  params = {
123
148
  }
@@ -128,7 +153,7 @@ module Appwrite
128
153
 
129
154
  @client.call(
130
155
  method: 'GET',
131
- path: path,
156
+ path: api_path,
132
157
  headers: headers,
133
158
  params: params,
134
159
  response_type: Models::PhoneList
@@ -143,7 +168,7 @@ module Appwrite
143
168
  #
144
169
  # @return [CurrencyList]
145
170
  def list_currencies()
146
- path = '/locale/currencies'
171
+ api_path = '/locale/currencies'
147
172
 
148
173
  params = {
149
174
  }
@@ -154,7 +179,7 @@ module Appwrite
154
179
 
155
180
  @client.call(
156
181
  method: 'GET',
157
- path: path,
182
+ path: api_path,
158
183
  headers: headers,
159
184
  params: params,
160
185
  response_type: Models::CurrencyList
@@ -168,7 +193,7 @@ module Appwrite
168
193
  #
169
194
  # @return [LanguageList]
170
195
  def list_languages()
171
- path = '/locale/languages'
196
+ api_path = '/locale/languages'
172
197
 
173
198
  params = {
174
199
  }
@@ -179,7 +204,7 @@ module Appwrite
179
204
 
180
205
  @client.call(
181
206
  method: 'GET',
182
- path: path,
207
+ path: api_path,
183
208
  headers: headers,
184
209
  params: params,
185
210
  response_type: Models::LanguageList
@@ -15,7 +15,7 @@ module Appwrite
15
15
  #
16
16
  # @return [BucketList]
17
17
  def list_buckets(queries: nil, search: nil)
18
- path = '/storage/buckets'
18
+ api_path = '/storage/buckets'
19
19
 
20
20
  params = {
21
21
  queries: queries,
@@ -28,7 +28,7 @@ module Appwrite
28
28
 
29
29
  @client.call(
30
30
  method: 'GET',
31
- path: path,
31
+ path: api_path,
32
32
  headers: headers,
33
33
  params: params,
34
34
  response_type: Models::BucketList
@@ -42,8 +42,8 @@ module Appwrite
42
42
  # @param [String] name Bucket name
43
43
  # @param [Array] permissions An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).
44
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).
45
- # @param [] enabled Is bucket enabled?
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)
45
+ # @param [] enabled Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
46
+ # @param [Integer] maximum_file_size Maximum file size allowed in bytes. Maximum allowed value is 30MB.
47
47
  # @param [Array] allowed_file_extensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
48
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
49
  # @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -51,7 +51,7 @@ module Appwrite
51
51
  #
52
52
  # @return [Bucket]
53
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)
54
- path = '/storage/buckets'
54
+ api_path = '/storage/buckets'
55
55
 
56
56
  if bucket_id.nil?
57
57
  raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
@@ -80,7 +80,7 @@ module Appwrite
80
80
 
81
81
  @client.call(
82
82
  method: 'POST',
83
- path: path,
83
+ path: api_path,
84
84
  headers: headers,
85
85
  params: params,
86
86
  response_type: Models::Bucket
@@ -95,7 +95,7 @@ module Appwrite
95
95
  #
96
96
  # @return [Bucket]
97
97
  def get_bucket(bucket_id:)
98
- path = '/storage/buckets/{bucketId}'
98
+ api_path = '/storage/buckets/{bucketId}'
99
99
  .gsub('{bucketId}', bucket_id)
100
100
 
101
101
  if bucket_id.nil?
@@ -111,7 +111,7 @@ module Appwrite
111
111
 
112
112
  @client.call(
113
113
  method: 'GET',
114
- path: path,
114
+ path: api_path,
115
115
  headers: headers,
116
116
  params: params,
117
117
  response_type: Models::Bucket
@@ -125,8 +125,8 @@ module Appwrite
125
125
  # @param [String] name Bucket name
126
126
  # @param [Array] permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
127
127
  # @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).
128
- # @param [] enabled Is bucket enabled?
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)
128
+ # @param [] enabled Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
129
+ # @param [Integer] maximum_file_size Maximum file size allowed in bytes. Maximum allowed value is 30MB.
130
130
  # @param [Array] allowed_file_extensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
131
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
132
  # @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -134,7 +134,7 @@ module Appwrite
134
134
  #
135
135
  # @return [Bucket]
136
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)
137
- path = '/storage/buckets/{bucketId}'
137
+ api_path = '/storage/buckets/{bucketId}'
138
138
  .gsub('{bucketId}', bucket_id)
139
139
 
140
140
  if bucket_id.nil?
@@ -163,7 +163,7 @@ module Appwrite
163
163
 
164
164
  @client.call(
165
165
  method: 'PUT',
166
- path: path,
166
+ path: api_path,
167
167
  headers: headers,
168
168
  params: params,
169
169
  response_type: Models::Bucket
@@ -177,7 +177,7 @@ module Appwrite
177
177
  #
178
178
  # @return []
179
179
  def delete_bucket(bucket_id:)
180
- path = '/storage/buckets/{bucketId}'
180
+ api_path = '/storage/buckets/{bucketId}'
181
181
  .gsub('{bucketId}', bucket_id)
182
182
 
183
183
  if bucket_id.nil?
@@ -193,7 +193,7 @@ module Appwrite
193
193
 
194
194
  @client.call(
195
195
  method: 'DELETE',
196
- path: path,
196
+ path: api_path,
197
197
  headers: headers,
198
198
  params: params,
199
199
  )
@@ -209,7 +209,7 @@ module Appwrite
209
209
  #
210
210
  # @return [FileList]
211
211
  def list_files(bucket_id:, queries: nil, search: nil)
212
- path = '/storage/buckets/{bucketId}/files'
212
+ api_path = '/storage/buckets/{bucketId}/files'
213
213
  .gsub('{bucketId}', bucket_id)
214
214
 
215
215
  if bucket_id.nil?
@@ -227,7 +227,7 @@ module Appwrite
227
227
 
228
228
  @client.call(
229
229
  method: 'GET',
230
- path: path,
230
+ path: api_path,
231
231
  headers: headers,
232
232
  params: params,
233
233
  response_type: Models::FileList
@@ -261,7 +261,7 @@ module Appwrite
261
261
  #
262
262
  # @return [File]
263
263
  def create_file(bucket_id:, file_id:, file:, permissions: nil, on_progress: nil)
264
- path = '/storage/buckets/{bucketId}/files'
264
+ api_path = '/storage/buckets/{bucketId}/files'
265
265
  .gsub('{bucketId}', bucket_id)
266
266
 
267
267
  if bucket_id.nil?
@@ -290,7 +290,7 @@ module Appwrite
290
290
  param_name = 'file'
291
291
 
292
292
  @client.chunked_upload(
293
- path: path,
293
+ path: api_path,
294
294
  headers: headers,
295
295
  params: params,
296
296
  param_name: param_name,
@@ -309,7 +309,7 @@ module Appwrite
309
309
  #
310
310
  # @return [File]
311
311
  def get_file(bucket_id:, file_id:)
312
- path = '/storage/buckets/{bucketId}/files/{fileId}'
312
+ api_path = '/storage/buckets/{bucketId}/files/{fileId}'
313
313
  .gsub('{bucketId}', bucket_id)
314
314
  .gsub('{fileId}', file_id)
315
315
 
@@ -330,7 +330,7 @@ module Appwrite
330
330
 
331
331
  @client.call(
332
332
  method: 'GET',
333
- path: path,
333
+ path: api_path,
334
334
  headers: headers,
335
335
  params: params,
336
336
  response_type: Models::File
@@ -343,11 +343,12 @@ module Appwrite
343
343
  #
344
344
  # @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).
345
345
  # @param [String] file_id File unique ID.
346
+ # @param [String] name Name of the file
346
347
  # @param [Array] permissions An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
347
348
  #
348
349
  # @return [File]
349
- def update_file(bucket_id:, file_id:, permissions: nil)
350
- path = '/storage/buckets/{bucketId}/files/{fileId}'
350
+ def update_file(bucket_id:, file_id:, name: nil, permissions: nil)
351
+ api_path = '/storage/buckets/{bucketId}/files/{fileId}'
351
352
  .gsub('{bucketId}', bucket_id)
352
353
  .gsub('{fileId}', file_id)
353
354
 
@@ -360,6 +361,7 @@ module Appwrite
360
361
  end
361
362
 
362
363
  params = {
364
+ name: name,
363
365
  permissions: permissions,
364
366
  }
365
367
 
@@ -369,7 +371,7 @@ module Appwrite
369
371
 
370
372
  @client.call(
371
373
  method: 'PUT',
372
- path: path,
374
+ path: api_path,
373
375
  headers: headers,
374
376
  params: params,
375
377
  response_type: Models::File
@@ -385,7 +387,7 @@ module Appwrite
385
387
  #
386
388
  # @return []
387
389
  def delete_file(bucket_id:, file_id:)
388
- path = '/storage/buckets/{bucketId}/files/{fileId}'
390
+ api_path = '/storage/buckets/{bucketId}/files/{fileId}'
389
391
  .gsub('{bucketId}', bucket_id)
390
392
  .gsub('{fileId}', file_id)
391
393
 
@@ -406,7 +408,7 @@ module Appwrite
406
408
 
407
409
  @client.call(
408
410
  method: 'DELETE',
409
- path: path,
411
+ path: api_path,
410
412
  headers: headers,
411
413
  params: params,
412
414
  )
@@ -422,7 +424,7 @@ module Appwrite
422
424
  #
423
425
  # @return []
424
426
  def get_file_download(bucket_id:, file_id:)
425
- path = '/storage/buckets/{bucketId}/files/{fileId}/download'
427
+ api_path = '/storage/buckets/{bucketId}/files/{fileId}/download'
426
428
  .gsub('{bucketId}', bucket_id)
427
429
  .gsub('{fileId}', file_id)
428
430
 
@@ -443,7 +445,7 @@ module Appwrite
443
445
 
444
446
  @client.call(
445
447
  method: 'GET',
446
- path: path,
448
+ path: api_path,
447
449
  headers: headers,
448
450
  params: params,
449
451
  )
@@ -472,7 +474,7 @@ module Appwrite
472
474
  #
473
475
  # @return []
474
476
  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)
475
- path = '/storage/buckets/{bucketId}/files/{fileId}/preview'
477
+ api_path = '/storage/buckets/{bucketId}/files/{fileId}/preview'
476
478
  .gsub('{bucketId}', bucket_id)
477
479
  .gsub('{fileId}', file_id)
478
480
 
@@ -504,7 +506,7 @@ module Appwrite
504
506
 
505
507
  @client.call(
506
508
  method: 'GET',
507
- path: path,
509
+ path: api_path,
508
510
  headers: headers,
509
511
  params: params,
510
512
  )
@@ -520,7 +522,7 @@ module Appwrite
520
522
  #
521
523
  # @return []
522
524
  def get_file_view(bucket_id:, file_id:)
523
- path = '/storage/buckets/{bucketId}/files/{fileId}/view'
525
+ api_path = '/storage/buckets/{bucketId}/files/{fileId}/view'
524
526
  .gsub('{bucketId}', bucket_id)
525
527
  .gsub('{fileId}', file_id)
526
528
 
@@ -541,7 +543,7 @@ module Appwrite
541
543
 
542
544
  @client.call(
543
545
  method: 'GET',
544
- path: path,
546
+ path: api_path,
545
547
  headers: headers,
546
548
  params: params,
547
549
  )