files.com 1.0.358 → 1.0.359
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 +1 -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: f1599878e275f8474e62ef8ab607377ba91b1703629a231147a3872551f71fb2
|
4
|
+
data.tar.gz: d7c004380e15efe49124f5a3267dc946ca3c7524237ecd1ab4b5698d63335327
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f95f18ac636769116b304b5c4eddbbf267ff3420a5bf03def0c9378ed29b79e5867ae48b5465e3d093ca4694d43c0c0ae8f8afe88f9631958c5ad6eb80b3806d
|
7
|
+
data.tar.gz: 369c1b04e84244486db565109a40f068677583104d8609204fcf859741a5463f9a997a7fa414a97808bffe032a158787f08289221dc2e8bfe67b29539c398ffe
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.359
|
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
|
@@ -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.359
|
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-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|