files.com 1.0.271 → 1.0.274
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/automation.md +1 -4
- data/docs/file.md +2 -2
- data/docs/folder.md +2 -2
- data/docs/preview.md +4 -4
- data/lib/files.com/api_client.rb +1 -1
- data/lib/files.com/errors.rb +1 -0
- data/lib/files.com/models/automation.rb +0 -11
- data/lib/files.com/models/preview.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28f289de4fdc1af526df1ad5996b49851f9d0920f4a32fddab1920643719db2c
|
4
|
+
data.tar.gz: 78ca02c22a203419f9a2185314f4aa8103ee630a0effdac437ee91e782ec553d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd8213b5ed0a7d10ce9b9d8add95f130929daeb167d795303280a5dc0fae2bc4d6074ffd2b5e660574053f26a0cf88f3865b6d1f40ec0a6bd2393d3f4eda8cd3
|
7
|
+
data.tar.gz: 8c07689fab4f83b48d39b4d38d0cfbab6763d1fb0932cd645e6392220e708f077ae1125529dab52e2daabc8d5d75ada45cfe53b7eac858cb935cef79fa3a1f8d
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.274
|
data/docs/automation.md
CHANGED
@@ -69,7 +69,6 @@
|
|
69
69
|
* `trigger_actions` (string): If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
|
70
70
|
* `value` (object): A Hash of attributes specific to the automation type.
|
71
71
|
* `destination` (string): DEPRECATED: Destination Path. Use `destinations` instead.
|
72
|
-
* `cloned_from` (int64): Set to the ID of automation used a clone template. For
|
73
72
|
|
74
73
|
|
75
74
|
---
|
@@ -128,8 +127,7 @@ Files::Automation.create(
|
|
128
127
|
trigger: "realtime",
|
129
128
|
trigger_actions: "[ \"create\" ]",
|
130
129
|
value: "{\"limit\": \"1\"}",
|
131
|
-
automation: "create_folder"
|
132
|
-
cloned_from: 1
|
130
|
+
automation: "create_folder"
|
133
131
|
)
|
134
132
|
```
|
135
133
|
|
@@ -152,7 +150,6 @@ Files::Automation.create(
|
|
152
150
|
* `trigger_actions` (array(string)): If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
|
153
151
|
* `value` (object): A Hash of attributes specific to the automation type.
|
154
152
|
* `automation` (string): Required - Automation type
|
155
|
-
* `cloned_from` (int64): Set to the ID of automation used a clone template. For
|
156
153
|
|
157
154
|
|
158
155
|
---
|
data/docs/file.md
CHANGED
data/docs/folder.md
CHANGED
data/docs/preview.md
CHANGED
@@ -7,13 +7,13 @@
|
|
7
7
|
"id": 1,
|
8
8
|
"status": "complete",
|
9
9
|
"download_uri": "https://mysite.files.com/...",
|
10
|
-
"type": "
|
11
|
-
"size":
|
10
|
+
"type": "image",
|
11
|
+
"size": "large"
|
12
12
|
}
|
13
13
|
```
|
14
14
|
|
15
15
|
* `id` (int64): Preview ID
|
16
16
|
* `status` (string): Preview status. Can be invalid, not_generated, generating, complete, or file_too_large
|
17
17
|
* `download_uri` (string): Link to download preview
|
18
|
-
* `type` (string): Preview
|
19
|
-
* `size` (
|
18
|
+
* `type` (string): Preview type. Can be image, pdf, pdf_native, video, or audio
|
19
|
+
* `size` (string): Preview size
|
data/lib/files.com/api_client.rb
CHANGED
@@ -150,7 +150,7 @@ module Files
|
|
150
150
|
uri = URI(uri)
|
151
151
|
Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http|
|
152
152
|
request = Net::HTTP::Get.new uri
|
153
|
-
request["RANGE"] = "bytes=#{range[0]}-#{range[1]}"
|
153
|
+
request["RANGE"] = "bytes=#{range[0]}-#{range[1]}" unless range.empty?
|
154
154
|
http.request request do |response|
|
155
155
|
io.fulfill_content_length(response.content_length) if io.respond_to?(:fulfill_content_length)
|
156
156
|
response.read_body do |chunk|
|
data/lib/files.com/errors.rb
CHANGED
@@ -193,6 +193,7 @@ module Files
|
|
193
193
|
|
194
194
|
class RateLimitedError < APIError; end
|
195
195
|
class ReauthenticationRateLimitedError < RateLimitedError; end
|
196
|
+
class TooManyConcurrentRequestsError < RateLimitedError; end
|
196
197
|
class TooManyLoginAttemptsError < RateLimitedError; end
|
197
198
|
class TooManyRequestsError < RateLimitedError; end
|
198
199
|
|
@@ -207,15 +207,6 @@ module Files
|
|
207
207
|
@attributes[:destination] = value
|
208
208
|
end
|
209
209
|
|
210
|
-
# int64 - Set to the ID of automation used a clone template. For
|
211
|
-
def cloned_from
|
212
|
-
@attributes[:cloned_from]
|
213
|
-
end
|
214
|
-
|
215
|
-
def cloned_from=(value)
|
216
|
-
@attributes[:cloned_from] = value
|
217
|
-
end
|
218
|
-
|
219
210
|
# Parameters:
|
220
211
|
# source - string - Source Path
|
221
212
|
# destination - string - DEPRECATED: Destination Path. Use `destinations` instead.
|
@@ -348,7 +339,6 @@ module Files
|
|
348
339
|
# trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
|
349
340
|
# value - object - A Hash of attributes specific to the automation type.
|
350
341
|
# automation (required) - string - Automation type
|
351
|
-
# cloned_from - int64 - Set to the ID of automation used a clone template. For
|
352
342
|
def self.create(params = {}, options = {})
|
353
343
|
raise InvalidParameterError.new("Bad parameter: source must be an String") if params.dig(:source) and !params.dig(:source).is_a?(String)
|
354
344
|
raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
|
@@ -366,7 +356,6 @@ module Files
|
|
366
356
|
raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params.dig(:trigger_actions) and !params.dig(:trigger_actions).is_a?(Array)
|
367
357
|
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if params.dig(:value) and !params.dig(:value).is_a?(Hash)
|
368
358
|
raise InvalidParameterError.new("Bad parameter: automation must be an String") if params.dig(:automation) and !params.dig(:automation).is_a?(String)
|
369
|
-
raise InvalidParameterError.new("Bad parameter: cloned_from must be an Integer") if params.dig(:cloned_from) and !params.dig(:cloned_from).is_a?(Integer)
|
370
359
|
raise MissingParameterError.new("Parameter missing: automation") unless params.dig(:automation)
|
371
360
|
|
372
361
|
response, options = Api.send_request("/automations", :post, params, options)
|
@@ -24,12 +24,12 @@ module Files
|
|
24
24
|
@attributes[:download_uri]
|
25
25
|
end
|
26
26
|
|
27
|
-
# string - Preview
|
27
|
+
# string - Preview type. Can be image, pdf, pdf_native, video, or audio
|
28
28
|
def type
|
29
29
|
@attributes[:type]
|
30
30
|
end
|
31
31
|
|
32
|
-
#
|
32
|
+
# string - Preview size
|
33
33
|
def size
|
34
34
|
@attributes[:size]
|
35
35
|
end
|
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.274
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|