files.com 1.0.191 → 1.0.192
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/webhook_test.md +6 -0
- data/lib/files.com/models/webhook_test.rb +21 -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: c33dcbebf1ea039dd95eea3a3c0d5f48e3083e10c94d6fe3badb6894a1305bc5
|
4
|
+
data.tar.gz: '089a9cb429011b238d26837f457cf5355440b93d8787b89e6e1ec0698c7e6b8b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9b6205bed60ce3e8cc2601a419d77d89046fd03c8ca5c3b7dffdef3292f312d6d729e29f14437b6c02649fa5c144c9df61d01c8315f4ef6a73a755cf68a2e2d
|
7
|
+
data.tar.gz: 9c77314bb77b717342f89f40098afec1ed2a9286ee63835d0fab8c1f8daf93ea54bdd95f8845586c5f5908077183734f4bd16eea7f7acee9383005cfa6c06ffd
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.192
|
data/docs/webhook_test.md
CHANGED
@@ -23,6 +23,8 @@
|
|
23
23
|
* `headers` (object): Additional request headers.
|
24
24
|
* `body` (object): Additional body parameters.
|
25
25
|
* `raw_body` (string): raw body text
|
26
|
+
* `file_as_body` (boolean): Send the file data as the request body?
|
27
|
+
* `file_form_field` (string): Send the file data as a named parameter in the request POST body
|
26
28
|
* `action` (string): action for test body
|
27
29
|
|
28
30
|
|
@@ -38,6 +40,8 @@ Files::WebhookTest.create(
|
|
38
40
|
headers: "x-test-header => testvalue",
|
39
41
|
body: "test-param => testvalue",
|
40
42
|
raw_body: "test body",
|
43
|
+
file_as_body: "false",
|
44
|
+
file_form_field: "upload_file_data",
|
41
45
|
action: "test"
|
42
46
|
)
|
43
47
|
```
|
@@ -50,4 +54,6 @@ Files::WebhookTest.create(
|
|
50
54
|
* `headers` (object): Additional request headers.
|
51
55
|
* `body` (object): Additional body parameters.
|
52
56
|
* `raw_body` (string): raw body text
|
57
|
+
* `file_as_body` (boolean): Send the file data as the request body?
|
58
|
+
* `file_form_field` (string): Send the file data as a named parameter in the request POST body
|
53
59
|
* `action` (string): action for test body
|
@@ -108,6 +108,24 @@ module Files
|
|
108
108
|
@attributes[:raw_body] = value
|
109
109
|
end
|
110
110
|
|
111
|
+
# boolean - Send the file data as the request body?
|
112
|
+
def file_as_body
|
113
|
+
@attributes[:file_as_body]
|
114
|
+
end
|
115
|
+
|
116
|
+
def file_as_body=(value)
|
117
|
+
@attributes[:file_as_body] = value
|
118
|
+
end
|
119
|
+
|
120
|
+
# string - Send the file data as a named parameter in the request POST body
|
121
|
+
def file_form_field
|
122
|
+
@attributes[:file_form_field]
|
123
|
+
end
|
124
|
+
|
125
|
+
def file_form_field=(value)
|
126
|
+
@attributes[:file_form_field] = value
|
127
|
+
end
|
128
|
+
|
111
129
|
# string - action for test body
|
112
130
|
def action
|
113
131
|
@attributes[:action]
|
@@ -133,6 +151,8 @@ module Files
|
|
133
151
|
# headers - object - Additional request headers.
|
134
152
|
# body - object - Additional body parameters.
|
135
153
|
# raw_body - string - raw body text
|
154
|
+
# file_as_body - boolean - Send the file data as the request body?
|
155
|
+
# file_form_field - string - Send the file data as a named parameter in the request POST body
|
136
156
|
# action - string - action for test body
|
137
157
|
def self.create(params = {}, options = {})
|
138
158
|
raise InvalidParameterError.new("Bad parameter: url must be an String") if params.dig(:url) and !params.dig(:url).is_a?(String)
|
@@ -141,6 +161,7 @@ module Files
|
|
141
161
|
raise InvalidParameterError.new("Bad parameter: headers must be an Hash") if params.dig(:headers) and !params.dig(:headers).is_a?(Hash)
|
142
162
|
raise InvalidParameterError.new("Bad parameter: body must be an Hash") if params.dig(:body) and !params.dig(:body).is_a?(Hash)
|
143
163
|
raise InvalidParameterError.new("Bad parameter: raw_body must be an String") if params.dig(:raw_body) and !params.dig(:raw_body).is_a?(String)
|
164
|
+
raise InvalidParameterError.new("Bad parameter: file_form_field must be an String") if params.dig(:file_form_field) and !params.dig(:file_form_field).is_a?(String)
|
144
165
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
145
166
|
raise MissingParameterError.new("Parameter missing: url") unless params.dig(:url)
|
146
167
|
|
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.192
|
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-08-
|
11
|
+
date: 2021-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|