files.com 1.0.138 → 1.0.139
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 +12 -4
- data/lib/files.com/models/automation.rb +14 -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: 0e1f06ee2365b74c9f17bef68f036f82b45421cb68b920c4420778cfd86528bc
|
4
|
+
data.tar.gz: 6e59f6ad45e0971aeb23febce688a0fe46a8c15bdf176396310153d251b38108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f8c04f34340787f6870e7736d8dce2a4890a78eebf2be2914e9d45d3762d29d8434a3ea264e28a5f02935ca40f3894dfec57f8211090f1d34fbf69f78525b01
|
7
|
+
data.tar.gz: d3c58a286e7502e73f00e4f88bf61e11b8c35c4799dba3555e135a34c1edb3d3a488ce66a3ae25ce8153f6cb80c2753af7279398f520552c5cb39327677497fe
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.139
|
data/docs/automation.md
CHANGED
@@ -37,7 +37,8 @@
|
|
37
37
|
],
|
38
38
|
"webhook_url": "https://app.files.com/api/webhooks/abc123",
|
39
39
|
"trigger_actions": "[ \"create\" ]",
|
40
|
-
"trigger_action_path": "path/to/file/or/folder"
|
40
|
+
"trigger_action_path": "path/to/file/or/folder",
|
41
|
+
"value": "{\"limit\": \"1\"}"
|
41
42
|
}
|
42
43
|
```
|
43
44
|
|
@@ -58,6 +59,7 @@
|
|
58
59
|
* `webhook_url` (string): If trigger is `webhook`, this is the URL of the webhook to trigger the Automation.
|
59
60
|
* `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
|
60
61
|
* `trigger_action_path` (string): If trigger is `action`, this is the path to watch for the specified trigger actions.
|
62
|
+
* `value` (object): A Hash of attributes specific to the automation type.
|
61
63
|
|
62
64
|
|
63
65
|
---
|
@@ -113,7 +115,8 @@ Files::Automation.create(
|
|
113
115
|
schedule: "{\"days_of_week\": [ 0, 1, 3 ], \"times_of_day\": [ \"7:30\", \"11:30\" ], \"time_zone\": \"Eastern Time (US & Canada)\"}",
|
114
116
|
trigger: "realtime",
|
115
117
|
trigger_actions: "[ \"create\" ]",
|
116
|
-
trigger_action_path: "path/to/file/or/folder"
|
118
|
+
trigger_action_path: "path/to/file/or/folder",
|
119
|
+
value: "{\"limit\": \"1\"}"
|
117
120
|
)
|
118
121
|
```
|
119
122
|
|
@@ -132,6 +135,7 @@ Files::Automation.create(
|
|
132
135
|
* `trigger` (string): How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
133
136
|
* `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
|
134
137
|
* `trigger_action_path` (string): If trigger is `action`, this is the path to watch for the specified trigger actions.
|
138
|
+
* `value` (object): A Hash of attributes specific to the automation type.
|
135
139
|
|
136
140
|
|
137
141
|
---
|
@@ -149,7 +153,8 @@ Files::Automation.update(id,
|
|
149
153
|
schedule: "{\"days_of_week\": [ 0, 1, 3 ], \"times_of_day\": [ \"7:30\", \"11:30\" ], \"time_zone\": \"Eastern Time (US & Canada)\"}",
|
150
154
|
trigger: "realtime",
|
151
155
|
trigger_actions: "[ \"create\" ]",
|
152
|
-
trigger_action_path: "path/to/file/or/folder"
|
156
|
+
trigger_action_path: "path/to/file/or/folder",
|
157
|
+
value: "{\"limit\": \"1\"}"
|
153
158
|
)
|
154
159
|
```
|
155
160
|
|
@@ -169,6 +174,7 @@ Files::Automation.update(id,
|
|
169
174
|
* `trigger` (string): How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
170
175
|
* `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
|
171
176
|
* `trigger_action_path` (string): If trigger is `action`, this is the path to watch for the specified trigger actions.
|
177
|
+
* `value` (object): A Hash of attributes specific to the automation type.
|
172
178
|
|
173
179
|
|
174
180
|
---
|
@@ -201,7 +207,8 @@ automation.update(
|
|
201
207
|
schedule: "{\"days_of_week\": [ 0, 1, 3 ], \"times_of_day\": [ \"7:30\", \"11:30\" ], \"time_zone\": \"Eastern Time (US & Canada)\"}",
|
202
208
|
trigger: "realtime",
|
203
209
|
trigger_actions: "[ \"create\" ]",
|
204
|
-
trigger_action_path: "path/to/file/or/folder"
|
210
|
+
trigger_action_path: "path/to/file/or/folder",
|
211
|
+
value: "{\"limit\": \"1\"}"
|
205
212
|
)
|
206
213
|
```
|
207
214
|
|
@@ -221,6 +228,7 @@ automation.update(
|
|
221
228
|
* `trigger` (string): How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
222
229
|
* `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
|
223
230
|
* `trigger_action_path` (string): If trigger is `action`, this is the path to watch for the specified trigger actions.
|
231
|
+
* `value` (object): A Hash of attributes specific to the automation type.
|
224
232
|
|
225
233
|
|
226
234
|
---
|
@@ -162,6 +162,15 @@ module Files
|
|
162
162
|
@attributes[:trigger_action_path] = value
|
163
163
|
end
|
164
164
|
|
165
|
+
# object - A Hash of attributes specific to the automation type.
|
166
|
+
def value
|
167
|
+
@attributes[:value]
|
168
|
+
end
|
169
|
+
|
170
|
+
def value=(value)
|
171
|
+
@attributes[:value] = value
|
172
|
+
end
|
173
|
+
|
165
174
|
# Parameters:
|
166
175
|
# automation (required) - string - Automation type
|
167
176
|
# source - string - Source Path
|
@@ -176,6 +185,7 @@ module Files
|
|
176
185
|
# trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
177
186
|
# 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
|
178
187
|
# trigger_action_path - string - If trigger is `action`, this is the path to watch for the specified trigger actions.
|
188
|
+
# value - object - A Hash of attributes specific to the automation type.
|
179
189
|
def update(params = {})
|
180
190
|
params ||= {}
|
181
191
|
params[:id] = @attributes[:id]
|
@@ -284,6 +294,7 @@ module Files
|
|
284
294
|
# trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
285
295
|
# 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
|
286
296
|
# trigger_action_path - string - If trigger is `action`, this is the path to watch for the specified trigger actions.
|
297
|
+
# value - object - A Hash of attributes specific to the automation type.
|
287
298
|
def self.create(params = {}, options = {})
|
288
299
|
raise InvalidParameterError.new("Bad parameter: automation must be an String") if params.dig(:automation) and !params.dig(:automation).is_a?(String)
|
289
300
|
raise InvalidParameterError.new("Bad parameter: source must be an String") if params.dig(:source) and !params.dig(:source).is_a?(String)
|
@@ -298,6 +309,7 @@ module Files
|
|
298
309
|
raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params.dig(:trigger) and !params.dig(:trigger).is_a?(String)
|
299
310
|
raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params.dig(:trigger_actions) and !params.dig(:trigger_actions).is_a?(Array)
|
300
311
|
raise InvalidParameterError.new("Bad parameter: trigger_action_path must be an String") if params.dig(:trigger_action_path) and !params.dig(:trigger_action_path).is_a?(String)
|
312
|
+
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if params.dig(:value) and !params.dig(:value).is_a?(Hash)
|
301
313
|
raise MissingParameterError.new("Parameter missing: automation") unless params.dig(:automation)
|
302
314
|
|
303
315
|
response, options = Api.send_request("/automations", :post, params, options)
|
@@ -318,6 +330,7 @@ module Files
|
|
318
330
|
# trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
319
331
|
# 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
|
320
332
|
# trigger_action_path - string - If trigger is `action`, this is the path to watch for the specified trigger actions.
|
333
|
+
# value - object - A Hash of attributes specific to the automation type.
|
321
334
|
def self.update(id, params = {}, options = {})
|
322
335
|
params ||= {}
|
323
336
|
params[:id] = id
|
@@ -335,6 +348,7 @@ module Files
|
|
335
348
|
raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params.dig(:trigger) and !params.dig(:trigger).is_a?(String)
|
336
349
|
raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params.dig(:trigger_actions) and !params.dig(:trigger_actions).is_a?(Array)
|
337
350
|
raise InvalidParameterError.new("Bad parameter: trigger_action_path must be an String") if params.dig(:trigger_action_path) and !params.dig(:trigger_action_path).is_a?(String)
|
351
|
+
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if params.dig(:value) and !params.dig(:value).is_a?(Hash)
|
338
352
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
339
353
|
raise MissingParameterError.new("Parameter missing: automation") unless params.dig(:automation)
|
340
354
|
|
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.139
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|