files.com 1.0.83 → 1.0.88
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/_VERSION +1 -1
- data/docs/api_key.md +13 -1
- data/docs/app.md +57 -0
- data/docs/automation.md +9 -1
- data/docs/behavior.md +30 -14
- data/docs/bundle.md +8 -0
- data/docs/file.md +0 -4
- data/docs/group.md +8 -0
- data/docs/history.md +16 -0
- data/docs/ip_address.md +19 -1
- data/docs/message.md +11 -11
- data/docs/notification.md +10 -2
- data/docs/permission.md +11 -3
- data/docs/public_ip_address.md +13 -0
- data/docs/remote_server.md +24 -4
- data/docs/request.md +6 -25
- data/docs/site.md +4 -0
- data/docs/style.md +1 -1
- data/docs/usage_daily_snapshot.md +8 -0
- data/docs/user.md +16 -2
- data/lib/files.com.rb +2 -0
- data/lib/files.com/models/api_key.rb +30 -4
- data/lib/files.com/models/app.rb +101 -0
- data/lib/files.com/models/automation.rb +19 -4
- data/lib/files.com/models/behavior.rb +53 -23
- data/lib/files.com/models/bundle.rb +19 -4
- data/lib/files.com/models/file.rb +7 -11
- data/lib/files.com/models/file_action.rb +6 -6
- data/lib/files.com/models/file_comment.rb +1 -1
- data/lib/files.com/models/folder.rb +2 -2
- data/lib/files.com/models/group.rb +18 -3
- data/lib/files.com/models/history.rb +43 -16
- data/lib/files.com/models/ip_address.rb +15 -0
- data/lib/files.com/models/lock.rb +4 -4
- data/lib/files.com/models/message.rb +5 -5
- data/lib/files.com/models/notification.rb +20 -5
- data/lib/files.com/models/permission.rb +21 -6
- data/lib/files.com/models/public_ip_address.rb +22 -0
- data/lib/files.com/models/remote_server.rb +45 -0
- data/lib/files.com/models/request.rb +15 -28
- data/lib/files.com/models/site.rb +6 -0
- data/lib/files.com/models/style.rb +8 -8
- data/lib/files.com/models/usage_daily_snapshot.rb +18 -3
- data/lib/files.com/models/user.rb +30 -5
- metadata +6 -2
@@ -47,5 +47,20 @@ module Files
|
|
47
47
|
def self.all(params = {}, options = {})
|
48
48
|
list(params, options)
|
49
49
|
end
|
50
|
+
|
51
|
+
# Parameters:
|
52
|
+
# page - int64 - Current page number.
|
53
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
54
|
+
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
55
|
+
def self.get_reserved(params = {}, options = {})
|
56
|
+
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
57
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
58
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
59
|
+
|
60
|
+
response, options = Api.send_request("/ip_addresses/reserved", :get, params, options)
|
61
|
+
response.data.map do |entity_data|
|
62
|
+
PublicIpAddress.new(entity_data, options)
|
63
|
+
end
|
64
|
+
end
|
50
65
|
end
|
51
66
|
end
|
@@ -101,7 +101,7 @@ module Files
|
|
101
101
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
102
102
|
raise MissingParameterError.new("Parameter missing: token") unless params.dig(:token)
|
103
103
|
|
104
|
-
Api.send_request("/locks/#{
|
104
|
+
Api.send_request("/locks/#{@attributes[:path]}", :delete, params, @options)
|
105
105
|
end
|
106
106
|
|
107
107
|
def destroy(params = {})
|
@@ -132,7 +132,7 @@ module Files
|
|
132
132
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
133
133
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
134
134
|
|
135
|
-
response, options = Api.send_request("/locks/#{
|
135
|
+
response, options = Api.send_request("/locks/#{params[:path]}", :get, params, options)
|
136
136
|
response.data.map do |entity_data|
|
137
137
|
Lock.new(entity_data, options)
|
138
138
|
end
|
@@ -148,7 +148,7 @@ module Files
|
|
148
148
|
raise InvalidParameterError.new("Bad parameter: timeout must be an Integer") if params.dig(:timeout) and !params.dig(:timeout).is_a?(Integer)
|
149
149
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
150
150
|
|
151
|
-
response, options = Api.send_request("/locks/#{
|
151
|
+
response, options = Api.send_request("/locks/#{params[:path]}", :post, params, options)
|
152
152
|
Lock.new(response.data, options)
|
153
153
|
end
|
154
154
|
|
@@ -162,7 +162,7 @@ module Files
|
|
162
162
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
163
163
|
raise MissingParameterError.new("Parameter missing: token") unless params.dig(:token)
|
164
164
|
|
165
|
-
response, _options = Api.send_request("/locks/#{
|
165
|
+
response, _options = Api.send_request("/locks/#{params[:path]}", :delete, params, options)
|
166
166
|
response.data
|
167
167
|
end
|
168
168
|
|
@@ -54,7 +54,7 @@ module Files
|
|
54
54
|
@attributes[:user_id] = value
|
55
55
|
end
|
56
56
|
|
57
|
-
# int64 - Project to
|
57
|
+
# int64 - Project to which the message should be attached.
|
58
58
|
def project_id
|
59
59
|
@attributes[:project_id]
|
60
60
|
end
|
@@ -64,7 +64,7 @@ module Files
|
|
64
64
|
end
|
65
65
|
|
66
66
|
# Parameters:
|
67
|
-
# project_id (required) - int64 - Project to
|
67
|
+
# project_id (required) - int64 - Project to which the message should be attached.
|
68
68
|
# subject (required) - string - Message subject.
|
69
69
|
# body (required) - string - Message body.
|
70
70
|
def update(params = {})
|
@@ -111,7 +111,7 @@ module Files
|
|
111
111
|
# page - int64 - Current page number.
|
112
112
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
113
113
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
114
|
-
# project_id (required) - int64 - Project to return messages
|
114
|
+
# project_id (required) - int64 - Project for which to return messages.
|
115
115
|
def self.list(params = {}, options = {})
|
116
116
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
117
117
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
@@ -148,7 +148,7 @@ module Files
|
|
148
148
|
|
149
149
|
# Parameters:
|
150
150
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
151
|
-
# project_id (required) - int64 - Project to
|
151
|
+
# project_id (required) - int64 - Project to which the message should be attached.
|
152
152
|
# subject (required) - string - Message subject.
|
153
153
|
# body (required) - string - Message body.
|
154
154
|
def self.create(params = {}, options = {})
|
@@ -165,7 +165,7 @@ module Files
|
|
165
165
|
end
|
166
166
|
|
167
167
|
# Parameters:
|
168
|
-
# project_id (required) - int64 - Project to
|
168
|
+
# project_id (required) - int64 - Project to which the message should be attached.
|
169
169
|
# subject (required) - string - Message subject.
|
170
170
|
# body (required) - string - Message body.
|
171
171
|
def self.update(id, params = {}, options = {})
|
@@ -156,11 +156,19 @@ module Files
|
|
156
156
|
end
|
157
157
|
|
158
158
|
# Parameters:
|
159
|
-
# user_id - int64 - Show notifications for this User ID.
|
159
|
+
# user_id - int64 - DEPRECATED: Show notifications for this User ID. Use `filter[user_id]` instead.
|
160
160
|
# page - int64 - Current page number.
|
161
161
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
162
162
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
163
|
-
#
|
163
|
+
# cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
164
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `path`, `user_id` or `group_id`.
|
165
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
|
166
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `user_id`, `group_id` or `path`.
|
167
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
|
168
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
|
169
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `user_id`, `group_id` or `path`.
|
170
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
|
171
|
+
# group_id - int64 - DEPRECATED: Show notifications for this Group ID. Use `filter[group_id]` instead.
|
164
172
|
# path - string - Show notifications for this Path.
|
165
173
|
# include_ancestors - boolean - If `include_ancestors` is `true` and `path` is specified, include notifications for any parent paths. Ignored if `path` is not specified.
|
166
174
|
def self.list(params = {}, options = {})
|
@@ -168,12 +176,19 @@ module Files
|
|
168
176
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
169
177
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
170
178
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
179
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
180
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
181
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
182
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
183
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
184
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
185
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
186
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
171
187
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
|
172
188
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
173
189
|
|
174
|
-
|
175
|
-
|
176
|
-
Notification.new(entity_data, options)
|
190
|
+
List.new(Notification, params) do
|
191
|
+
Api.send_request("/notifications", :get, params, options)
|
177
192
|
end
|
178
193
|
end
|
179
194
|
|
@@ -94,9 +94,17 @@ module Files
|
|
94
94
|
# page - int64 - Current page number.
|
95
95
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
96
96
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
97
|
+
# cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
98
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `deleted_at`, `group_id`, `path`, `user_id` or `permission`.
|
99
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
100
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
101
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
102
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
103
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
104
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
105
|
+
# path - string - DEPRECATED: Permission path. If provided, will scope permissions to this path. Use `filter[path]` instead.
|
106
|
+
# group_id - string - DEPRECATED: Group ID. If provided, will scope permissions to this group. Use `filter[group_id]` instead.`
|
107
|
+
# user_id - string - DEPRECATED: User ID. If provided, will scope permissions to this user. Use `filter[user_id]` instead.`
|
100
108
|
# include_groups - boolean - If searching by user or group, also include user's permissions that are inherited from its groups?
|
101
109
|
def self.list(path, params = {}, options = {})
|
102
110
|
params ||= {}
|
@@ -104,13 +112,20 @@ module Files
|
|
104
112
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
105
113
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
106
114
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
115
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
116
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
117
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
118
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
119
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
120
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
121
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
122
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
107
123
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
108
124
|
raise InvalidParameterError.new("Bad parameter: group_id must be an String") if params.dig(:group_id) and !params.dig(:group_id).is_a?(String)
|
109
125
|
raise InvalidParameterError.new("Bad parameter: user_id must be an String") if params.dig(:user_id) and !params.dig(:user_id).is_a?(String)
|
110
126
|
|
111
|
-
|
112
|
-
|
113
|
-
Permission.new(entity_data, options)
|
127
|
+
List.new(Permission, params) do
|
128
|
+
Api.send_request("/permissions", :get, params, options)
|
114
129
|
end
|
115
130
|
end
|
116
131
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class PublicIpAddress
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# string - The public IP address.
|
13
|
+
def ip_address
|
14
|
+
@attributes[:ip_address]
|
15
|
+
end
|
16
|
+
|
17
|
+
# string - The name of the frontend server.
|
18
|
+
def server_name
|
19
|
+
@attributes[:server_name]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -243,6 +243,24 @@ module Files
|
|
243
243
|
@attributes[:one_drive_account_type] = value
|
244
244
|
end
|
245
245
|
|
246
|
+
# string - Azure Blob Storage Account name
|
247
|
+
def azure_blob_storage_account
|
248
|
+
@attributes[:azure_blob_storage_account]
|
249
|
+
end
|
250
|
+
|
251
|
+
def azure_blob_storage_account=(value)
|
252
|
+
@attributes[:azure_blob_storage_account] = value
|
253
|
+
end
|
254
|
+
|
255
|
+
# string - Azure Blob Storage Container name
|
256
|
+
def azure_blob_storage_container
|
257
|
+
@attributes[:azure_blob_storage_container]
|
258
|
+
end
|
259
|
+
|
260
|
+
def azure_blob_storage_container=(value)
|
261
|
+
@attributes[:azure_blob_storage_container] = value
|
262
|
+
end
|
263
|
+
|
246
264
|
# string - AWS Access Key.
|
247
265
|
def aws_access_key
|
248
266
|
@attributes[:aws_access_key]
|
@@ -342,6 +360,15 @@ module Files
|
|
342
360
|
@attributes[:reset_authentication] = value
|
343
361
|
end
|
344
362
|
|
363
|
+
# string - Azure Blob Storage secret key.
|
364
|
+
def azure_blob_storage_access_key
|
365
|
+
@attributes[:azure_blob_storage_access_key]
|
366
|
+
end
|
367
|
+
|
368
|
+
def azure_blob_storage_access_key=(value)
|
369
|
+
@attributes[:azure_blob_storage_access_key] = value
|
370
|
+
end
|
371
|
+
|
345
372
|
# Parameters:
|
346
373
|
# aws_access_key - string - AWS Access Key.
|
347
374
|
# aws_secret_key - string - AWS secret key.
|
@@ -354,6 +381,7 @@ module Files
|
|
354
381
|
# backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
|
355
382
|
# rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
|
356
383
|
# reset_authentication - boolean - Reset authenticated account
|
384
|
+
# azure_blob_storage_access_key - string - Azure Blob Storage secret key.
|
357
385
|
# hostname - string - Hostname or IP address
|
358
386
|
# name - string - Internal name for your reference
|
359
387
|
# max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
|
@@ -375,6 +403,8 @@ module Files
|
|
375
403
|
# rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
|
376
404
|
# rackspace_container - string - The name of the container (top level directory) where files will sync.
|
377
405
|
# one_drive_account_type - string - Either personal or business_other account types
|
406
|
+
# azure_blob_storage_account - string - Azure Blob Storage Account name
|
407
|
+
# azure_blob_storage_container - string - Azure Blob Storage Container name
|
378
408
|
def update(params = {})
|
379
409
|
params ||= {}
|
380
410
|
params[:id] = @attributes[:id]
|
@@ -390,6 +420,7 @@ module Files
|
|
390
420
|
raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String)
|
391
421
|
raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String)
|
392
422
|
raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String)
|
423
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String)
|
393
424
|
raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String)
|
394
425
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
395
426
|
raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer)
|
@@ -411,6 +442,8 @@ module Files
|
|
411
442
|
raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String)
|
412
443
|
raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String)
|
413
444
|
raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String)
|
445
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String)
|
446
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String)
|
414
447
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
415
448
|
|
416
449
|
Api.send_request("/remote_servers/#{@attributes[:id]}", :patch, params, @options)
|
@@ -486,6 +519,7 @@ module Files
|
|
486
519
|
# backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
|
487
520
|
# rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
|
488
521
|
# reset_authentication - boolean - Reset authenticated account
|
522
|
+
# azure_blob_storage_access_key - string - Azure Blob Storage secret key.
|
489
523
|
# hostname - string - Hostname or IP address
|
490
524
|
# name - string - Internal name for your reference
|
491
525
|
# max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
|
@@ -507,6 +541,8 @@ module Files
|
|
507
541
|
# rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
|
508
542
|
# rackspace_container - string - The name of the container (top level directory) where files will sync.
|
509
543
|
# one_drive_account_type - string - Either personal or business_other account types
|
544
|
+
# azure_blob_storage_account - string - Azure Blob Storage Account name
|
545
|
+
# azure_blob_storage_container - string - Azure Blob Storage Container name
|
510
546
|
def self.create(params = {}, options = {})
|
511
547
|
raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params.dig(:aws_access_key) and !params.dig(:aws_access_key).is_a?(String)
|
512
548
|
raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params.dig(:aws_secret_key) and !params.dig(:aws_secret_key).is_a?(String)
|
@@ -518,6 +554,7 @@ module Files
|
|
518
554
|
raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String)
|
519
555
|
raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String)
|
520
556
|
raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String)
|
557
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String)
|
521
558
|
raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String)
|
522
559
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
523
560
|
raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer)
|
@@ -539,6 +576,8 @@ module Files
|
|
539
576
|
raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String)
|
540
577
|
raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String)
|
541
578
|
raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String)
|
579
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String)
|
580
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String)
|
542
581
|
|
543
582
|
response, options = Api.send_request("/remote_servers", :post, params, options)
|
544
583
|
RemoteServer.new(response.data, options)
|
@@ -556,6 +595,7 @@ module Files
|
|
556
595
|
# backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
|
557
596
|
# rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
|
558
597
|
# reset_authentication - boolean - Reset authenticated account
|
598
|
+
# azure_blob_storage_access_key - string - Azure Blob Storage secret key.
|
559
599
|
# hostname - string - Hostname or IP address
|
560
600
|
# name - string - Internal name for your reference
|
561
601
|
# max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
|
@@ -577,6 +617,8 @@ module Files
|
|
577
617
|
# rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
|
578
618
|
# rackspace_container - string - The name of the container (top level directory) where files will sync.
|
579
619
|
# one_drive_account_type - string - Either personal or business_other account types
|
620
|
+
# azure_blob_storage_account - string - Azure Blob Storage Account name
|
621
|
+
# azure_blob_storage_container - string - Azure Blob Storage Container name
|
580
622
|
def self.update(id, params = {}, options = {})
|
581
623
|
params ||= {}
|
582
624
|
params[:id] = id
|
@@ -591,6 +633,7 @@ module Files
|
|
591
633
|
raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String)
|
592
634
|
raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String)
|
593
635
|
raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String)
|
636
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String)
|
594
637
|
raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String)
|
595
638
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
596
639
|
raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer)
|
@@ -612,6 +655,8 @@ module Files
|
|
612
655
|
raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String)
|
613
656
|
raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String)
|
614
657
|
raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String)
|
658
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String)
|
659
|
+
raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String)
|
615
660
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
616
661
|
|
617
662
|
response, options = Api.send_request("/remote_servers/#{params[:id]}", :patch, params, options)
|
@@ -81,25 +81,6 @@ module Files
|
|
81
81
|
@attributes[:group_ids] = value
|
82
82
|
end
|
83
83
|
|
84
|
-
# List Requests
|
85
|
-
#
|
86
|
-
# Parameters:
|
87
|
-
# page - int64 - Current page number.
|
88
|
-
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
89
|
-
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
90
|
-
# mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
91
|
-
def folders(params = {})
|
92
|
-
params ||= {}
|
93
|
-
params[:path] = @attributes[:path]
|
94
|
-
raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
|
95
|
-
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
96
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
97
|
-
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
98
|
-
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
99
|
-
|
100
|
-
Api.send_request("/requests/folders/#{Addressable::URI.encode_component(params[:path])}", :get, params, @options)
|
101
|
-
end
|
102
|
-
|
103
84
|
def save
|
104
85
|
if @attributes[:path]
|
105
86
|
raise NotImplementedError.new("The Request object doesn't support updates.")
|
@@ -113,6 +94,8 @@ module Files
|
|
113
94
|
# page - int64 - Current page number.
|
114
95
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
115
96
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
97
|
+
# cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
98
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `folder_id` or `destination`.
|
116
99
|
# mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
117
100
|
# path - string - Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
|
118
101
|
def self.list(path, params = {}, options = {})
|
@@ -121,11 +104,12 @@ module Files
|
|
121
104
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
122
105
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
123
106
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
107
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
108
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
124
109
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
125
110
|
|
126
|
-
|
127
|
-
|
128
|
-
Request.new(entity_data, options)
|
111
|
+
List.new(Request, params) do
|
112
|
+
Api.send_request("/requests", :get, params, options)
|
129
113
|
end
|
130
114
|
end
|
131
115
|
|
@@ -133,24 +117,27 @@ module Files
|
|
133
117
|
list(path, params, options)
|
134
118
|
end
|
135
119
|
|
136
|
-
# List Requests
|
137
|
-
#
|
138
120
|
# Parameters:
|
139
121
|
# page - int64 - Current page number.
|
140
122
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
141
123
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
124
|
+
# cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
125
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `folder_id` or `destination`.
|
142
126
|
# mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
143
|
-
|
127
|
+
# path (required) - string - Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
|
128
|
+
def self.find_folder(path, params = {}, options = {})
|
144
129
|
params ||= {}
|
145
130
|
params[:path] = path
|
146
131
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
147
132
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
148
133
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
134
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
135
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
149
136
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
137
|
+
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
150
138
|
|
151
|
-
|
152
|
-
|
153
|
-
Request.new(entity_data, options)
|
139
|
+
List.new(Request, params) do
|
140
|
+
Api.send_request("/requests/folders/#{params[:path]}", :get, params, options)
|
154
141
|
end
|
155
142
|
end
|
156
143
|
|
@@ -309,6 +309,11 @@ module Files
|
|
309
309
|
@attributes[:next_billing_date]
|
310
310
|
end
|
311
311
|
|
312
|
+
# boolean - Allow users to use Office for the web?
|
313
|
+
def office_integration_available
|
314
|
+
@attributes[:office_integration_available]
|
315
|
+
end
|
316
|
+
|
312
317
|
# boolean - Use servers in the USA only?
|
313
318
|
def opt_out_global
|
314
319
|
@attributes[:opt_out_global]
|
@@ -585,6 +590,7 @@ module Files
|
|
585
590
|
# desktop_app_session_lifetime - int64 - Desktop app session lifetime (in hours)
|
586
591
|
# folder_permissions_groups_only - boolean - If true, permissions for this site must be bound to a group (not a user). Otherwise, permissions must be bound to a user.
|
587
592
|
# welcome_screen - string - Does the welcome screen appear?
|
593
|
+
# office_integration_available - boolean - Allow users to use Office for the web?
|
588
594
|
# session_expiry - double - Session expiry in hours
|
589
595
|
# ssl_required - boolean - Is SSL required? Disabling this is insecure.
|
590
596
|
# tls_disabled - boolean - Is TLS disabled(site setting)?
|