files.com 1.0.358 → 1.0.360
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 +28 -0
- data/lib/files.com/errors.rb +2 -0
- data/lib/files.com/models/automation.rb +22 -0
- 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: 2eb3429977e609d5efd76881c24044c793b9baab4b8a8059da2d1409fc92c469
|
4
|
+
data.tar.gz: 7add25c3fae403114d8eb06f9eef14f3c653e844b06d6263bf66f77f562de733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a152096a762cf3db328046ad38ca386d30636086e60bc362f75460a3962708a848366848331631d03252464ecbe4520915ff21f40c2e5791267a3be86c396ae4
|
7
|
+
data.tar.gz: bf4c878aa3745b2ec4f96e94cf4800f36c43aa03e031b5a375476870976f9d24d36246c76e6602832e7d622d73dd92407a01c885ae1fcacc74beb50a4686e142
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.360
|
data/docs/automation.md
CHANGED
@@ -158,6 +158,19 @@ Files::Automation.create(
|
|
158
158
|
* `automation` (string): Required - Automation type
|
159
159
|
|
160
160
|
|
161
|
+
---
|
162
|
+
|
163
|
+
## Manually run automation
|
164
|
+
|
165
|
+
```
|
166
|
+
Files::Automation.manual_run(id)
|
167
|
+
```
|
168
|
+
|
169
|
+
### Parameters
|
170
|
+
|
171
|
+
* `id` (int64): Required - Automation ID.
|
172
|
+
|
173
|
+
|
161
174
|
---
|
162
175
|
|
163
176
|
## Update Automation
|
@@ -222,6 +235,21 @@ Files::Automation.delete(id)
|
|
222
235
|
* `id` (int64): Required - Automation ID.
|
223
236
|
|
224
237
|
|
238
|
+
---
|
239
|
+
|
240
|
+
## Manually run automation
|
241
|
+
|
242
|
+
```
|
243
|
+
automation = Files::Automation.list.first
|
244
|
+
|
245
|
+
automation.manual_run
|
246
|
+
```
|
247
|
+
|
248
|
+
### Parameters
|
249
|
+
|
250
|
+
* `id` (int64): Required - Automation ID.
|
251
|
+
|
252
|
+
|
225
253
|
---
|
226
254
|
|
227
255
|
## Update Automation
|
data/lib/files.com/errors.rb
CHANGED
@@ -152,6 +152,7 @@ module Files
|
|
152
152
|
class UserNotFoundError < NotFoundError; end
|
153
153
|
|
154
154
|
class ProcessingFailureError < APIError; end
|
155
|
+
class AutomationCannotBeRunManuallyError < ProcessingFailureError; end
|
155
156
|
class BundleOnlyAllowsPreviewsError < ProcessingFailureError; end
|
156
157
|
class BundleOperationRequiresSubfolderError < ProcessingFailureError; end
|
157
158
|
class CouldNotCreateParentError < ProcessingFailureError; end
|
@@ -188,6 +189,7 @@ module Files
|
|
188
189
|
class UpdatesNotAllowedForRemotesError < ProcessingFailureError; end
|
189
190
|
|
190
191
|
class RateLimitedError < APIError; end
|
192
|
+
class DuplicateShareRecipientError < RateLimitedError; end
|
191
193
|
class ReauthenticationRateLimitedError < RateLimitedError; end
|
192
194
|
class TooManyConcurrentRequestsError < RateLimitedError; end
|
193
195
|
class TooManyLoginAttemptsError < RateLimitedError; end
|
@@ -225,6 +225,17 @@ module Files
|
|
225
225
|
@attributes[:destination] = value
|
226
226
|
end
|
227
227
|
|
228
|
+
# Manually run automation
|
229
|
+
def manual_run(params = {})
|
230
|
+
params ||= {}
|
231
|
+
params[:id] = @attributes[:id]
|
232
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
233
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
234
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
235
|
+
|
236
|
+
Api.send_request("/automations/#{@attributes[:id]}/manual_run", :post, params, @options)
|
237
|
+
end
|
238
|
+
|
228
239
|
# Parameters:
|
229
240
|
# source - string - Source Path
|
230
241
|
# destination - string - DEPRECATED: Destination Path. Use `destinations` instead.
|
@@ -384,6 +395,17 @@ module Files
|
|
384
395
|
Automation.new(response.data, options)
|
385
396
|
end
|
386
397
|
|
398
|
+
# Manually run automation
|
399
|
+
def self.manual_run(id, params = {}, options = {})
|
400
|
+
params ||= {}
|
401
|
+
params[:id] = id
|
402
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
403
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
404
|
+
|
405
|
+
response, _options = Api.send_request("/automations/#{params[:id]}/manual_run", :post, params, options)
|
406
|
+
response.data
|
407
|
+
end
|
408
|
+
|
387
409
|
# Parameters:
|
388
410
|
# source - string - Source Path
|
389
411
|
# destination - string - DEPRECATED: Destination Path. Use `destinations` instead.
|
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.360
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|