files.com 1.0.80 → 1.0.85
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/app.md +45 -0
- data/docs/behavior.md +11 -3
- data/docs/file.md +2 -0
- data/docs/file_action.md +6 -2
- data/docs/folder.md +2 -0
- data/docs/group_user.md +12 -2
- data/docs/ip_address.md +1 -1
- data/docs/permission.md +1 -1
- data/docs/remote_server.md +24 -4
- data/docs/user.md +7 -8
- data/lib/files.com.rb +1 -0
- data/lib/files.com/models/app.rb +76 -0
- data/lib/files.com/models/behavior.rb +10 -1
- data/lib/files.com/models/file.rb +4 -0
- data/lib/files.com/models/file_action.rb +2 -0
- data/lib/files.com/models/folder.rb +1 -0
- data/lib/files.com/models/group_user.rb +14 -0
- data/lib/files.com/models/permission.rb +1 -1
- data/lib/files.com/models/remote_server.rb +45 -0
- data/lib/files.com/models/user.rb +7 -5
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f256669e61998c0d04e226d0f790790fe0727fff5a0a4ff5d91711e91b207dc
|
|
4
|
+
data.tar.gz: 13c775f7f838a326c807878ea590e4ebb326177b557ef7ab4934a8e3888e2f0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc7836b465ba29c3161ef92d853994f4fe186623c58bb3fa9f46e126dcbb6f34aa189a90b21d80c49cb3b8610af3e64a84dde4a017743df29357849bee536222
|
|
7
|
+
data.tar.gz: 7c09856639a412cfe9e24aad75fdf3bfdca104d7f7077126f3c4c4f9b7b192251a0fd648e11c38e720f45afc78a45bf958a38fe09c33198435c25625c2e8cdc6
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.85
|
data/docs/app.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# App
|
|
2
|
+
|
|
3
|
+
## Example App Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"name": "",
|
|
8
|
+
"extended_description": "",
|
|
9
|
+
"documentation_links": "Important Info => http://files.test/learn-more",
|
|
10
|
+
"sso_strategy_type": "",
|
|
11
|
+
"remote_server_type": "",
|
|
12
|
+
"folder_behavior_type": "",
|
|
13
|
+
"external_homepage_url": "",
|
|
14
|
+
"app_type": "",
|
|
15
|
+
"featured": true
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
* `name` (string): Name of the App
|
|
20
|
+
* `extended_description` (string): Long form description of the App
|
|
21
|
+
* `documentation_links` (string): Collection of named links to documentation
|
|
22
|
+
* `sso_strategy_type` (string): Associated SSO Strategy type, if any
|
|
23
|
+
* `remote_server_type` (string): Associated Remote Server type, if any
|
|
24
|
+
* `folder_behavior_type` (string): Associated Folder Behavior type, if any
|
|
25
|
+
* `external_homepage_url` (string): Link to external homepage
|
|
26
|
+
* `app_type` (string): The type of the App
|
|
27
|
+
* `featured` (boolean): Is featured on the App listing?
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## List Apps
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Files::App.list(
|
|
36
|
+
page: 1,
|
|
37
|
+
per_page: 1
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Parameters
|
|
42
|
+
|
|
43
|
+
* `page` (int64): Current page number.
|
|
44
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
45
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
data/docs/behavior.md
CHANGED
|
@@ -107,7 +107,8 @@ Files::Behavior.webhook_test(
|
|
|
107
107
|
method: "GET",
|
|
108
108
|
encoding: "RAW",
|
|
109
109
|
headers: "x-test-header => testvalue",
|
|
110
|
-
body: "test-param => testvalue"
|
|
110
|
+
body: "test-param => testvalue",
|
|
111
|
+
action: "test"
|
|
111
112
|
)
|
|
112
113
|
```
|
|
113
114
|
|
|
@@ -118,6 +119,7 @@ Files::Behavior.webhook_test(
|
|
|
118
119
|
* `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data).
|
|
119
120
|
* `headers` (object): Additional request headers.
|
|
120
121
|
* `body` (object): Additional body parameters.
|
|
122
|
+
* `action` (string): action for test body
|
|
121
123
|
|
|
122
124
|
|
|
123
125
|
---
|
|
@@ -126,7 +128,8 @@ Files::Behavior.webhook_test(
|
|
|
126
128
|
|
|
127
129
|
```
|
|
128
130
|
Files::Behavior.update(id,
|
|
129
|
-
value: "{\"method\": \"GET\"}"
|
|
131
|
+
value: "{\"method\": \"GET\"}",
|
|
132
|
+
behavior: "webhook"
|
|
130
133
|
)
|
|
131
134
|
```
|
|
132
135
|
|
|
@@ -135,6 +138,8 @@ Files::Behavior.update(id,
|
|
|
135
138
|
* `id` (int64): Required - Behavior ID.
|
|
136
139
|
* `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
|
|
137
140
|
* `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
|
141
|
+
* `behavior` (string): Behavior type.
|
|
142
|
+
* `path` (string): Folder behaviors path.
|
|
138
143
|
|
|
139
144
|
|
|
140
145
|
---
|
|
@@ -158,7 +163,8 @@ Files::Behavior.delete(id)
|
|
|
158
163
|
behavior = Files::Behavior.list_for(path).first
|
|
159
164
|
|
|
160
165
|
behavior.update(
|
|
161
|
-
value: "{\"method\": \"GET\"}"
|
|
166
|
+
value: "{\"method\": \"GET\"}",
|
|
167
|
+
behavior: "webhook"
|
|
162
168
|
)
|
|
163
169
|
```
|
|
164
170
|
|
|
@@ -167,6 +173,8 @@ behavior.update(
|
|
|
167
173
|
* `id` (int64): Required - Behavior ID.
|
|
168
174
|
* `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
|
|
169
175
|
* `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
|
176
|
+
* `behavior` (string): Behavior type.
|
|
177
|
+
* `path` (string): Folder behaviors path.
|
|
170
178
|
|
|
171
179
|
|
|
172
180
|
---
|
data/docs/file.md
CHANGED
|
@@ -72,6 +72,7 @@ Files::File.download(path,
|
|
|
72
72
|
* `path` (string): Required - Path to operate on.
|
|
73
73
|
* `action` (string): Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
|
|
74
74
|
* `id` (int64): If provided, lookup the file by id instead of path.
|
|
75
|
+
* `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
75
76
|
* `with_previews` (boolean): Include file preview information?
|
|
76
77
|
* `with_priority_color` (boolean): Include file priority color information?
|
|
77
78
|
|
|
@@ -164,6 +165,7 @@ file.download(
|
|
|
164
165
|
* `path` (string): Required - Path to operate on.
|
|
165
166
|
* `action` (string): Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
|
|
166
167
|
* `id` (int64): If provided, lookup the file by id instead of path.
|
|
168
|
+
* `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
167
169
|
* `with_previews` (boolean): Include file preview information?
|
|
168
170
|
* `with_priority_color` (boolean): Include file priority color information?
|
|
169
171
|
|
data/docs/file_action.md
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
Files::FileAction.copy(path,
|
|
9
|
-
destination: "destination"
|
|
9
|
+
destination: "destination",
|
|
10
|
+
structure: true
|
|
10
11
|
)
|
|
11
12
|
```
|
|
12
13
|
|
|
@@ -14,6 +15,7 @@ Files::FileAction.copy(path,
|
|
|
14
15
|
|
|
15
16
|
* `path` (string): Required - Path to operate on.
|
|
16
17
|
* `destination` (string): Required - Copy destination path.
|
|
18
|
+
* `structure` (boolean): Copy structure only?
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
---
|
|
@@ -66,7 +68,8 @@ Files::FileAction.begin_upload(path,
|
|
|
66
68
|
file_action = Files::FileAction.list_for(path).first
|
|
67
69
|
|
|
68
70
|
file_action.copy(
|
|
69
|
-
destination: "destination"
|
|
71
|
+
destination: "destination",
|
|
72
|
+
structure: true
|
|
70
73
|
)
|
|
71
74
|
```
|
|
72
75
|
|
|
@@ -74,6 +77,7 @@ file_action.copy(
|
|
|
74
77
|
|
|
75
78
|
* `path` (string): Required - Path to operate on.
|
|
76
79
|
* `destination` (string): Required - Copy destination path.
|
|
80
|
+
* `structure` (boolean): Copy structure only?
|
|
77
81
|
|
|
78
82
|
|
|
79
83
|
---
|
data/docs/folder.md
CHANGED
|
@@ -57,6 +57,7 @@ Files::Folder.list_for(path,
|
|
|
57
57
|
page: 1,
|
|
58
58
|
per_page: 1,
|
|
59
59
|
search_all: true,
|
|
60
|
+
with_previews: true,
|
|
60
61
|
with_priority_color: true
|
|
61
62
|
)
|
|
62
63
|
```
|
|
@@ -72,6 +73,7 @@ Files::Folder.list_for(path,
|
|
|
72
73
|
* `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
73
74
|
* `search` (string): If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
|
|
74
75
|
* `search_all` (boolean): Search entire site?
|
|
76
|
+
* `with_previews` (boolean): Include file previews?
|
|
75
77
|
* `with_priority_color` (boolean): Include file priority color information?
|
|
76
78
|
|
|
77
79
|
|
data/docs/group_user.md
CHANGED
|
@@ -69,12 +69,17 @@ Files::GroupUser.update(id,
|
|
|
69
69
|
## Delete Group User
|
|
70
70
|
|
|
71
71
|
```
|
|
72
|
-
Files::GroupUser.delete(id
|
|
72
|
+
Files::GroupUser.delete(id,
|
|
73
|
+
group_id: 1,
|
|
74
|
+
user_id: 1
|
|
75
|
+
)
|
|
73
76
|
```
|
|
74
77
|
|
|
75
78
|
### Parameters
|
|
76
79
|
|
|
77
80
|
* `id` (int64): Required - Group User ID.
|
|
81
|
+
* `group_id` (int64): Required - Group ID from which to remove user.
|
|
82
|
+
* `user_id` (int64): Required - User ID to remove from group.
|
|
78
83
|
|
|
79
84
|
|
|
80
85
|
---
|
|
@@ -106,9 +111,14 @@ group_user.update(
|
|
|
106
111
|
```
|
|
107
112
|
group_user = Files::GroupUser.list_for(path).first
|
|
108
113
|
|
|
109
|
-
group_user.delete
|
|
114
|
+
group_user.delete(
|
|
115
|
+
group_id: 1,
|
|
116
|
+
user_id: 1
|
|
117
|
+
)
|
|
110
118
|
```
|
|
111
119
|
|
|
112
120
|
### Parameters
|
|
113
121
|
|
|
114
122
|
* `id` (int64): Required - Group User ID.
|
|
123
|
+
* `group_id` (int64): Required - Group ID from which to remove user.
|
|
124
|
+
* `user_id` (int64): Required - User ID to remove from group.
|
data/docs/ip_address.md
CHANGED
data/docs/permission.md
CHANGED
|
@@ -68,7 +68,7 @@ Files::Permission.create(path,
|
|
|
68
68
|
|
|
69
69
|
* `group_id` (int64): Group ID
|
|
70
70
|
* `path` (string): Folder path
|
|
71
|
-
* `permission` (string): Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `
|
|
71
|
+
* `permission` (string): Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `list`, or `history`
|
|
72
72
|
* `recursive` (boolean): Apply to subfolders recursively?
|
|
73
73
|
* `user_id` (int64): User ID. Provide `username` or `user_id`
|
|
74
74
|
* `username` (string): User username. Provide `username` or `user_id`
|
data/docs/remote_server.md
CHANGED
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
"auth_setup_link": "auth/:provider",
|
|
30
30
|
"auth_status": "in_setup",
|
|
31
31
|
"auth_account_name": "me@example.com",
|
|
32
|
-
"one_drive_account_type": "personal"
|
|
32
|
+
"one_drive_account_type": "personal",
|
|
33
|
+
"azure_blob_storage_account": "storage-account-name",
|
|
34
|
+
"azure_blob_storage_container": "container-name"
|
|
33
35
|
}
|
|
34
36
|
```
|
|
35
37
|
|
|
@@ -59,6 +61,8 @@
|
|
|
59
61
|
* `auth_status` (string): Either `in_setup` or `complete`
|
|
60
62
|
* `auth_account_name` (string): Describes the authorized account
|
|
61
63
|
* `one_drive_account_type` (string): Either personal or business_other account types
|
|
64
|
+
* `azure_blob_storage_account` (string): Azure Blob Storage Account name
|
|
65
|
+
* `azure_blob_storage_container` (string): Azure Blob Storage Container name
|
|
62
66
|
* `aws_access_key` (string): AWS Access Key.
|
|
63
67
|
* `aws_secret_key` (string): AWS secret key.
|
|
64
68
|
* `password` (string): Password if needed.
|
|
@@ -70,6 +74,7 @@
|
|
|
70
74
|
* `backblaze_b2_application_key` (string): Backblaze B2 Cloud Storage applicationKey.
|
|
71
75
|
* `rackspace_api_key` (string): Rackspace API key from the Rackspace Cloud Control Panel.
|
|
72
76
|
* `reset_authentication` (boolean): Reset authenticated account
|
|
77
|
+
* `azure_blob_storage_access_key` (string): Azure Blob Storage secret key.
|
|
73
78
|
|
|
74
79
|
|
|
75
80
|
---
|
|
@@ -130,7 +135,9 @@ Files::RemoteServer.create(
|
|
|
130
135
|
rackspace_username: "rackspaceuser",
|
|
131
136
|
rackspace_region: "dfw",
|
|
132
137
|
rackspace_container: "my-container",
|
|
133
|
-
one_drive_account_type: "personal"
|
|
138
|
+
one_drive_account_type: "personal",
|
|
139
|
+
azure_blob_storage_account: "storage-account-name",
|
|
140
|
+
azure_blob_storage_container: "container-name"
|
|
134
141
|
)
|
|
135
142
|
```
|
|
136
143
|
|
|
@@ -147,6 +154,7 @@ Files::RemoteServer.create(
|
|
|
147
154
|
* `backblaze_b2_application_key` (string): Backblaze B2 Cloud Storage applicationKey.
|
|
148
155
|
* `rackspace_api_key` (string): Rackspace API key from the Rackspace Cloud Control Panel.
|
|
149
156
|
* `reset_authentication` (boolean): Reset authenticated account
|
|
157
|
+
* `azure_blob_storage_access_key` (string): Azure Blob Storage secret key.
|
|
150
158
|
* `hostname` (string): Hostname or IP address
|
|
151
159
|
* `name` (string): Internal name for your reference
|
|
152
160
|
* `max_connections` (int64): Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
|
|
@@ -168,6 +176,8 @@ Files::RemoteServer.create(
|
|
|
168
176
|
* `rackspace_region` (string): Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
|
|
169
177
|
* `rackspace_container` (string): The name of the container (top level directory) where files will sync.
|
|
170
178
|
* `one_drive_account_type` (string): Either personal or business_other account types
|
|
179
|
+
* `azure_blob_storage_account` (string): Azure Blob Storage Account name
|
|
180
|
+
* `azure_blob_storage_container` (string): Azure Blob Storage Container name
|
|
171
181
|
|
|
172
182
|
|
|
173
183
|
---
|
|
@@ -197,7 +207,9 @@ Files::RemoteServer.update(id,
|
|
|
197
207
|
rackspace_username: "rackspaceuser",
|
|
198
208
|
rackspace_region: "dfw",
|
|
199
209
|
rackspace_container: "my-container",
|
|
200
|
-
one_drive_account_type: "personal"
|
|
210
|
+
one_drive_account_type: "personal",
|
|
211
|
+
azure_blob_storage_account: "storage-account-name",
|
|
212
|
+
azure_blob_storage_container: "container-name"
|
|
201
213
|
)
|
|
202
214
|
```
|
|
203
215
|
|
|
@@ -215,6 +227,7 @@ Files::RemoteServer.update(id,
|
|
|
215
227
|
* `backblaze_b2_application_key` (string): Backblaze B2 Cloud Storage applicationKey.
|
|
216
228
|
* `rackspace_api_key` (string): Rackspace API key from the Rackspace Cloud Control Panel.
|
|
217
229
|
* `reset_authentication` (boolean): Reset authenticated account
|
|
230
|
+
* `azure_blob_storage_access_key` (string): Azure Blob Storage secret key.
|
|
218
231
|
* `hostname` (string): Hostname or IP address
|
|
219
232
|
* `name` (string): Internal name for your reference
|
|
220
233
|
* `max_connections` (int64): Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
|
|
@@ -236,6 +249,8 @@ Files::RemoteServer.update(id,
|
|
|
236
249
|
* `rackspace_region` (string): Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
|
|
237
250
|
* `rackspace_container` (string): The name of the container (top level directory) where files will sync.
|
|
238
251
|
* `one_drive_account_type` (string): Either personal or business_other account types
|
|
252
|
+
* `azure_blob_storage_account` (string): Azure Blob Storage Account name
|
|
253
|
+
* `azure_blob_storage_container` (string): Azure Blob Storage Container name
|
|
239
254
|
|
|
240
255
|
|
|
241
256
|
---
|
|
@@ -280,7 +295,9 @@ remote_server.update(
|
|
|
280
295
|
rackspace_username: "rackspaceuser",
|
|
281
296
|
rackspace_region: "dfw",
|
|
282
297
|
rackspace_container: "my-container",
|
|
283
|
-
one_drive_account_type: "personal"
|
|
298
|
+
one_drive_account_type: "personal",
|
|
299
|
+
azure_blob_storage_account: "storage-account-name",
|
|
300
|
+
azure_blob_storage_container: "container-name"
|
|
284
301
|
)
|
|
285
302
|
```
|
|
286
303
|
|
|
@@ -298,6 +315,7 @@ remote_server.update(
|
|
|
298
315
|
* `backblaze_b2_application_key` (string): Backblaze B2 Cloud Storage applicationKey.
|
|
299
316
|
* `rackspace_api_key` (string): Rackspace API key from the Rackspace Cloud Control Panel.
|
|
300
317
|
* `reset_authentication` (boolean): Reset authenticated account
|
|
318
|
+
* `azure_blob_storage_access_key` (string): Azure Blob Storage secret key.
|
|
301
319
|
* `hostname` (string): Hostname or IP address
|
|
302
320
|
* `name` (string): Internal name for your reference
|
|
303
321
|
* `max_connections` (int64): Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
|
|
@@ -319,6 +337,8 @@ remote_server.update(
|
|
|
319
337
|
* `rackspace_region` (string): Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
|
|
320
338
|
* `rackspace_container` (string): The name of the container (top level directory) where files will sync.
|
|
321
339
|
* `one_drive_account_type` (string): Either personal or business_other account types
|
|
340
|
+
* `azure_blob_storage_account` (string): Azure Blob Storage Account name
|
|
341
|
+
* `azure_blob_storage_container` (string): Azure Blob Storage Container name
|
|
322
342
|
|
|
323
343
|
|
|
324
344
|
---
|
data/docs/user.md
CHANGED
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
"disabled": true,
|
|
24
24
|
"email": "john.doe@files.com",
|
|
25
25
|
"ftp_permission": true,
|
|
26
|
-
"group_ids":
|
|
27
|
-
|
|
28
|
-
],
|
|
26
|
+
"group_ids": "",
|
|
29
27
|
"header_text": "User-specific message.",
|
|
30
28
|
"language": "en",
|
|
31
29
|
"last_login_at": "2000-01-01T01:00:00Z",
|
|
@@ -72,7 +70,7 @@
|
|
|
72
70
|
* `disabled` (boolean): Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting.
|
|
73
71
|
* `email` (email): User email address
|
|
74
72
|
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
|
75
|
-
* `group_ids` (
|
|
73
|
+
* `group_ids` (string): Comma-separated list of group IDs of which this user is a member
|
|
76
74
|
* `header_text` (string): Text to display to the user in the header of the UI
|
|
77
75
|
* `language` (string): Preferred language
|
|
78
76
|
* `last_login_at` (date-time): User's last login time
|
|
@@ -103,7 +101,7 @@
|
|
|
103
101
|
* `avatar_delete` (boolean): If true, the avatar will be deleted.
|
|
104
102
|
* `change_password` (string): Used for changing a password on an existing user.
|
|
105
103
|
* `change_password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
|
106
|
-
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `
|
|
104
|
+
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
|
107
105
|
* `group_id` (int64): Group ID to associate this user with.
|
|
108
106
|
* `password` (string): User password.
|
|
109
107
|
* `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
|
|
@@ -126,6 +124,7 @@ Files::User.list(
|
|
|
126
124
|
* `page` (int64): Current page number.
|
|
127
125
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
128
126
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
|
127
|
+
* `ids` (string): comma-separated list of User IDs
|
|
129
128
|
* `q[username]` (string): List users matching username.
|
|
130
129
|
* `q[email]` (string): List users matching email.
|
|
131
130
|
* `q[notes]` (string): List users matching notes field.
|
|
@@ -199,7 +198,7 @@ Files::User.create(
|
|
|
199
198
|
* `change_password` (string): Used for changing a password on an existing user.
|
|
200
199
|
* `change_password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
|
201
200
|
* `email` (string): User's email.
|
|
202
|
-
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `
|
|
201
|
+
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
|
203
202
|
* `group_id` (int64): Group ID to associate this user with.
|
|
204
203
|
* `group_ids` (string): A list of group ids to associate this user with. Comma delimited.
|
|
205
204
|
* `password` (string): User password.
|
|
@@ -324,7 +323,7 @@ Files::User.update(id,
|
|
|
324
323
|
* `change_password` (string): Used for changing a password on an existing user.
|
|
325
324
|
* `change_password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
|
326
325
|
* `email` (string): User's email.
|
|
327
|
-
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `
|
|
326
|
+
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
|
328
327
|
* `group_id` (int64): Group ID to associate this user with.
|
|
329
328
|
* `group_ids` (string): A list of group ids to associate this user with. Comma delimited.
|
|
330
329
|
* `password` (string): User password.
|
|
@@ -470,7 +469,7 @@ user.update(
|
|
|
470
469
|
* `change_password` (string): Used for changing a password on an existing user.
|
|
471
470
|
* `change_password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
|
472
471
|
* `email` (string): User's email.
|
|
473
|
-
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `
|
|
472
|
+
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
|
474
473
|
* `group_id` (int64): Group ID to associate this user with.
|
|
475
474
|
* `group_ids` (string): A list of group ids to associate this user with. Comma delimited.
|
|
476
475
|
* `password` (string): User password.
|
data/lib/files.com.rb
CHANGED
|
@@ -29,6 +29,7 @@ require "files.com/list"
|
|
|
29
29
|
require "files.com/models/account_line_item"
|
|
30
30
|
require "files.com/models/action"
|
|
31
31
|
require "files.com/models/api_key"
|
|
32
|
+
require "files.com/models/app"
|
|
32
33
|
require "files.com/models/as2_key"
|
|
33
34
|
require "files.com/models/auto"
|
|
34
35
|
require "files.com/models/automation"
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Files
|
|
4
|
+
class App
|
|
5
|
+
attr_reader :options, :attributes
|
|
6
|
+
|
|
7
|
+
def initialize(attributes = {}, options = {})
|
|
8
|
+
@attributes = attributes || {}
|
|
9
|
+
@options = options || {}
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# string - Name of the App
|
|
13
|
+
def name
|
|
14
|
+
@attributes[:name]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# string - Long form description of the App
|
|
18
|
+
def extended_description
|
|
19
|
+
@attributes[:extended_description]
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# string - Collection of named links to documentation
|
|
23
|
+
def documentation_links
|
|
24
|
+
@attributes[:documentation_links]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# string - Associated SSO Strategy type, if any
|
|
28
|
+
def sso_strategy_type
|
|
29
|
+
@attributes[:sso_strategy_type]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# string - Associated Remote Server type, if any
|
|
33
|
+
def remote_server_type
|
|
34
|
+
@attributes[:remote_server_type]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# string - Associated Folder Behavior type, if any
|
|
38
|
+
def folder_behavior_type
|
|
39
|
+
@attributes[:folder_behavior_type]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# string - Link to external homepage
|
|
43
|
+
def external_homepage_url
|
|
44
|
+
@attributes[:external_homepage_url]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# string - The type of the App
|
|
48
|
+
def app_type
|
|
49
|
+
@attributes[:app_type]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# boolean - Is featured on the App listing?
|
|
53
|
+
def featured
|
|
54
|
+
@attributes[:featured]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Parameters:
|
|
58
|
+
# page - int64 - Current page number.
|
|
59
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
60
|
+
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
|
61
|
+
def self.list(params = {}, options = {})
|
|
62
|
+
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
|
63
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
|
64
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
|
65
|
+
|
|
66
|
+
response, options = Api.send_request("/apps", :get, params, options)
|
|
67
|
+
response.data.map do |entity_data|
|
|
68
|
+
App.new(entity_data, options)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def self.all(params = {}, options = {})
|
|
73
|
+
list(params, options)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -66,12 +66,16 @@ module Files
|
|
|
66
66
|
# Parameters:
|
|
67
67
|
# value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
|
|
68
68
|
# attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
|
69
|
+
# behavior - string - Behavior type.
|
|
70
|
+
# path - string - Folder behaviors path.
|
|
69
71
|
def update(params = {})
|
|
70
72
|
params ||= {}
|
|
71
73
|
params[:id] = @attributes[:id]
|
|
72
74
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
73
75
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
|
74
76
|
raise InvalidParameterError.new("Bad parameter: value must be an String") if params.dig(:value) and !params.dig(:value).is_a?(String)
|
|
77
|
+
raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params.dig(:behavior) and !params.dig(:behavior).is_a?(String)
|
|
78
|
+
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
|
75
79
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
|
76
80
|
|
|
77
81
|
Api.send_request("/behaviors/#{@attributes[:id]}", :patch, params, @options)
|
|
@@ -183,12 +187,14 @@ module Files
|
|
|
183
187
|
# encoding - string - HTTP encoding method. Can be JSON, XML, or RAW (form data).
|
|
184
188
|
# headers - object - Additional request headers.
|
|
185
189
|
# body - object - Additional body parameters.
|
|
190
|
+
# action - string - action for test body
|
|
186
191
|
def self.webhook_test(params = {}, options = {})
|
|
187
192
|
raise InvalidParameterError.new("Bad parameter: url must be an String") if params.dig(:url) and !params.dig(:url).is_a?(String)
|
|
188
193
|
raise InvalidParameterError.new("Bad parameter: method must be an String") if params.dig(:method) and !params.dig(:method).is_a?(String)
|
|
189
194
|
raise InvalidParameterError.new("Bad parameter: encoding must be an String") if params.dig(:encoding) and !params.dig(:encoding).is_a?(String)
|
|
190
195
|
raise InvalidParameterError.new("Bad parameter: headers must be an Hash") if params.dig(:headers) and !params.dig(:headers).is_a?(Hash)
|
|
191
196
|
raise InvalidParameterError.new("Bad parameter: body must be an Hash") if params.dig(:body) and !params.dig(:body).is_a?(Hash)
|
|
197
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
|
192
198
|
raise MissingParameterError.new("Parameter missing: url") unless params.dig(:url)
|
|
193
199
|
|
|
194
200
|
response, _options = Api.send_request("/behaviors/webhook/test", :post, params, options)
|
|
@@ -198,12 +204,15 @@ module Files
|
|
|
198
204
|
# Parameters:
|
|
199
205
|
# value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
|
|
200
206
|
# attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
|
207
|
+
# behavior - string - Behavior type.
|
|
208
|
+
# path - string - Folder behaviors path.
|
|
201
209
|
def self.update(id, params = {}, options = {})
|
|
202
210
|
params ||= {}
|
|
203
211
|
params[:id] = id
|
|
204
212
|
raise InvalidParameterError.new("Bad parameter: id must be one of String, Integer, Hash") if params.dig(:id) and [ String, Integer, Hash ].none? { |klass| params.dig(:id).is_a?(klass) }
|
|
205
213
|
raise InvalidParameterError.new("Bad parameter: value must be an String") if params.dig(:value) and !params.dig(:value).is_a?(String)
|
|
206
|
-
raise InvalidParameterError.new("Bad parameter:
|
|
214
|
+
raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params.dig(:behavior) and !params.dig(:behavior).is_a?(String)
|
|
215
|
+
raise InvalidParameterError.new("Bad parameter: path must be one of String, Integer, Hash") if params.dig(:path) and [ String, Integer, Hash ].none? { |klass| params.dig(:path).is_a?(klass) }
|
|
207
216
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
|
208
217
|
|
|
209
218
|
response, options = Api.send_request("/behaviors/#{params[:id]}", :patch, params, options)
|
|
@@ -827,6 +827,7 @@ module Files
|
|
|
827
827
|
# Parameters:
|
|
828
828
|
# action - string - Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
|
|
829
829
|
# id - int64 - If provided, lookup the file by id instead of path.
|
|
830
|
+
# preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
830
831
|
# with_previews - boolean - Include file preview information?
|
|
831
832
|
# with_priority_color - boolean - Include file priority color information?
|
|
832
833
|
def download(params = {})
|
|
@@ -836,6 +837,7 @@ module Files
|
|
|
836
837
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
|
837
838
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
|
838
839
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
|
840
|
+
raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
|
|
839
841
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
|
840
842
|
|
|
841
843
|
Api.send_request("/files/#{Addressable::URI.encode_component(params[:path])}", :get, params, @options)
|
|
@@ -886,6 +888,7 @@ module Files
|
|
|
886
888
|
# Parameters:
|
|
887
889
|
# action - string - Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
|
|
888
890
|
# id - int64 - If provided, lookup the file by id instead of path.
|
|
891
|
+
# preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
889
892
|
# with_previews - boolean - Include file preview information?
|
|
890
893
|
# with_priority_color - boolean - Include file priority color information?
|
|
891
894
|
def self.download(path, params = {}, options = {})
|
|
@@ -894,6 +897,7 @@ module Files
|
|
|
894
897
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
|
895
898
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
|
896
899
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
|
900
|
+
raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
|
|
897
901
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
|
898
902
|
|
|
899
903
|
response, options = Api.send_request("/files/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
|
|
@@ -13,6 +13,7 @@ module Files
|
|
|
13
13
|
#
|
|
14
14
|
# Parameters:
|
|
15
15
|
# destination (required) - string - Copy destination path.
|
|
16
|
+
# structure - boolean - Copy structure only?
|
|
16
17
|
def copy(params = {})
|
|
17
18
|
params ||= {}
|
|
18
19
|
params[:path] = @attributes[:path]
|
|
@@ -68,6 +69,7 @@ module Files
|
|
|
68
69
|
#
|
|
69
70
|
# Parameters:
|
|
70
71
|
# destination (required) - string - Copy destination path.
|
|
72
|
+
# structure - boolean - Copy structure only?
|
|
71
73
|
def self.copy(path, params = {}, options = {})
|
|
72
74
|
params ||= {}
|
|
73
75
|
params[:path] = path
|
|
@@ -322,6 +322,7 @@ module Files
|
|
|
322
322
|
# preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
323
323
|
# search - string - If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
|
|
324
324
|
# search_all - boolean - Search entire site?
|
|
325
|
+
# with_previews - boolean - Include file previews?
|
|
325
326
|
# with_priority_color - boolean - Include file priority color information?
|
|
326
327
|
def self.list_for(path, params = {}, options = {})
|
|
327
328
|
params ||= {}
|
|
@@ -81,12 +81,19 @@ module Files
|
|
|
81
81
|
Api.send_request("/group_users/#{@attributes[:id]}", :patch, params, @options)
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
# Parameters:
|
|
85
|
+
# group_id (required) - int64 - Group ID from which to remove user.
|
|
86
|
+
# user_id (required) - int64 - User ID to remove from group.
|
|
84
87
|
def delete(params = {})
|
|
85
88
|
params ||= {}
|
|
86
89
|
params[:id] = @attributes[:id]
|
|
87
90
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
88
91
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
|
92
|
+
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
|
|
93
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
|
89
94
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
|
95
|
+
raise MissingParameterError.new("Parameter missing: group_id") unless params.dig(:group_id)
|
|
96
|
+
raise MissingParameterError.new("Parameter missing: user_id") unless params.dig(:user_id)
|
|
90
97
|
|
|
91
98
|
Api.send_request("/group_users/#{@attributes[:id]}", :delete, params, @options)
|
|
92
99
|
end
|
|
@@ -140,11 +147,18 @@ module Files
|
|
|
140
147
|
GroupUser.new(response.data, options)
|
|
141
148
|
end
|
|
142
149
|
|
|
150
|
+
# Parameters:
|
|
151
|
+
# group_id (required) - int64 - Group ID from which to remove user.
|
|
152
|
+
# user_id (required) - int64 - User ID to remove from group.
|
|
143
153
|
def self.delete(id, params = {}, options = {})
|
|
144
154
|
params ||= {}
|
|
145
155
|
params[:id] = id
|
|
146
156
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
|
157
|
+
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
|
|
158
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
|
147
159
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
|
160
|
+
raise MissingParameterError.new("Parameter missing: group_id") unless params.dig(:group_id)
|
|
161
|
+
raise MissingParameterError.new("Parameter missing: user_id") unless params.dig(:user_id)
|
|
148
162
|
|
|
149
163
|
response, _options = Api.send_request("/group_users/#{params[:id]}", :delete, params, options)
|
|
150
164
|
response.data
|
|
@@ -121,7 +121,7 @@ module Files
|
|
|
121
121
|
# Parameters:
|
|
122
122
|
# group_id - int64 - Group ID
|
|
123
123
|
# path - string - Folder path
|
|
124
|
-
# permission - string - Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `
|
|
124
|
+
# permission - string - Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `list`, or `history`
|
|
125
125
|
# recursive - boolean - Apply to subfolders recursively?
|
|
126
126
|
# user_id - int64 - User ID. Provide `username` or `user_id`
|
|
127
127
|
# username - string - User username. Provide `username` or `user_id`
|
|
@@ -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)
|
|
@@ -158,7 +158,7 @@ module Files
|
|
|
158
158
|
@attributes[:ftp_permission] = value
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
-
#
|
|
161
|
+
# string - Comma-separated list of group IDs of which this user is a member
|
|
162
162
|
def group_ids
|
|
163
163
|
@attributes[:group_ids]
|
|
164
164
|
end
|
|
@@ -437,7 +437,7 @@ module Files
|
|
|
437
437
|
@attributes[:change_password_confirmation] = value
|
|
438
438
|
end
|
|
439
439
|
|
|
440
|
-
# string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `
|
|
440
|
+
# string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
|
441
441
|
def grant_permission
|
|
442
442
|
@attributes[:grant_permission]
|
|
443
443
|
end
|
|
@@ -521,7 +521,7 @@ module Files
|
|
|
521
521
|
# change_password - string - Used for changing a password on an existing user.
|
|
522
522
|
# change_password_confirmation - string - Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
|
523
523
|
# email - string - User's email.
|
|
524
|
-
# grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `
|
|
524
|
+
# grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
|
525
525
|
# group_id - int64 - Group ID to associate this user with.
|
|
526
526
|
# group_ids - string - A list of group ids to associate this user with. Comma delimited.
|
|
527
527
|
# password - string - User password.
|
|
@@ -615,6 +615,7 @@ module Files
|
|
|
615
615
|
# page - int64 - Current page number.
|
|
616
616
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
617
617
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
|
618
|
+
# ids - string - comma-separated list of User IDs
|
|
618
619
|
# q[username] - string - List users matching username.
|
|
619
620
|
# q[email] - string - List users matching email.
|
|
620
621
|
# q[notes] - string - List users matching notes field.
|
|
@@ -629,6 +630,7 @@ module Files
|
|
|
629
630
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
|
630
631
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
|
631
632
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
|
633
|
+
raise InvalidParameterError.new("Bad parameter: ids must be an String") if params.dig(:ids) and !params.dig(:ids).is_a?(String)
|
|
632
634
|
raise InvalidParameterError.new("Bad parameter: search must be an String") if params.dig(:search) and !params.dig(:search).is_a?(String)
|
|
633
635
|
|
|
634
636
|
response, options = Api.send_request("/users", :get, params, options)
|
|
@@ -663,7 +665,7 @@ module Files
|
|
|
663
665
|
# change_password - string - Used for changing a password on an existing user.
|
|
664
666
|
# change_password_confirmation - string - Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
|
665
667
|
# email - string - User's email.
|
|
666
|
-
# grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `
|
|
668
|
+
# grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
|
667
669
|
# group_id - int64 - Group ID to associate this user with.
|
|
668
670
|
# group_ids - string - A list of group ids to associate this user with. Comma delimited.
|
|
669
671
|
# password - string - User password.
|
|
@@ -765,7 +767,7 @@ module Files
|
|
|
765
767
|
# change_password - string - Used for changing a password on an existing user.
|
|
766
768
|
# change_password_confirmation - string - Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
|
767
769
|
# email - string - User's email.
|
|
768
|
-
# grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `
|
|
770
|
+
# grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
|
769
771
|
# group_id - int64 - Group ID to associate this user with.
|
|
770
772
|
# group_ids - string - A list of group ids to associate this user with. Comma delimited.
|
|
771
773
|
# password - string - User password.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: files.com
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.85
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-07-
|
|
11
|
+
date: 2020-07-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -87,6 +87,7 @@ files:
|
|
|
87
87
|
- docs/account_line_item.md
|
|
88
88
|
- docs/action.md
|
|
89
89
|
- docs/api_key.md
|
|
90
|
+
- docs/app.md
|
|
90
91
|
- docs/as2_key.md
|
|
91
92
|
- docs/auto.md
|
|
92
93
|
- docs/automation.md
|
|
@@ -144,6 +145,7 @@ files:
|
|
|
144
145
|
- lib/files.com/models/account_line_item.rb
|
|
145
146
|
- lib/files.com/models/action.rb
|
|
146
147
|
- lib/files.com/models/api_key.rb
|
|
148
|
+
- lib/files.com/models/app.rb
|
|
147
149
|
- lib/files.com/models/as2_key.rb
|
|
148
150
|
- lib/files.com/models/auto.rb
|
|
149
151
|
- lib/files.com/models/automation.rb
|