files.com 1.0.82 → 1.0.83

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 291ed1937c452b1f0b2949b0188f3eee3083fba6a49ea3ce42e664b89bcc49c3
4
- data.tar.gz: e8af65f7aad9a09e547184bac4caa3e53ac506dbf1462ae13a91bb461302072b
3
+ metadata.gz: 006441fb28a84982b4ee2960d7dac9521bc3da4cf322f94384d52d290364e05a
4
+ data.tar.gz: f12f3f8953ba55bdc5e34cdd2729804385ea860a761e88ee8e88a0a30fa4e881
5
5
  SHA512:
6
- metadata.gz: 0e884b02521b63b92fae0107df8d9853dee8518eedab399c3c055c5737851bdb7211a77c74524a447072aed6c27df29a76423817696ea04b218380a1647e74f5
7
- data.tar.gz: f6f41719640ef692004aec3035c51366430d6a3ea1108c4ca383488c640a688f5bad37c127280e119807e3e5c91aca97484cc0cb37db5cb530207f7040c173e7
6
+ metadata.gz: f9b2cef26cd02577de07509902c20690a0308425756c4c65630aee0580002ef6ec4ea7ed56055657f8c9172bdcba61fa2197ad173cd207f5641f8e34b44db18c
7
+ data.tar.gz: 37fefaa5025389fae566ffeb3fce600102b5e1793f9bf1e3f63e6c05ef9c6a8ba42ba7ad9cd39e6a7eec457a4421161985421e83716d90299b7a6d7a6a6d81b6
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.82
1
+ 1.0.83
@@ -107,7 +107,8 @@ Files::Behavior.webhook_test(
107
107
  method: "GET",
108
108
  encoding: "RAW",
109
109
  headers: "x-test-header => testvalue",
110
- body: "test-param => testvalue"
110
+ body: "test-param => testvalue",
111
+ action: "test"
111
112
  )
112
113
  ```
113
114
 
@@ -118,6 +119,7 @@ Files::Behavior.webhook_test(
118
119
  * `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data).
119
120
  * `headers` (object): Additional request headers.
120
121
  * `body` (object): Additional body parameters.
122
+ * `action` (string): action for test body
121
123
 
122
124
 
123
125
  ---
@@ -126,7 +128,8 @@ Files::Behavior.webhook_test(
126
128
 
127
129
  ```
128
130
  Files::Behavior.update(id,
129
- value: "{\"method\": \"GET\"}"
131
+ value: "{\"method\": \"GET\"}",
132
+ behavior: "webhook"
130
133
  )
131
134
  ```
132
135
 
@@ -135,6 +138,8 @@ Files::Behavior.update(id,
135
138
  * `id` (int64): Required - Behavior ID.
136
139
  * `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
137
140
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
141
+ * `behavior` (string): Behavior type.
142
+ * `path` (string): Folder behaviors path.
138
143
 
139
144
 
140
145
  ---
@@ -158,7 +163,8 @@ Files::Behavior.delete(id)
158
163
  behavior = Files::Behavior.list_for(path).first
159
164
 
160
165
  behavior.update(
161
- value: "{\"method\": \"GET\"}"
166
+ value: "{\"method\": \"GET\"}",
167
+ behavior: "webhook"
162
168
  )
163
169
  ```
164
170
 
@@ -167,6 +173,8 @@ behavior.update(
167
173
  * `id` (int64): Required - Behavior ID.
168
174
  * `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
169
175
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
176
+ * `behavior` (string): Behavior type.
177
+ * `path` (string): Folder behaviors path.
170
178
 
171
179
 
172
180
  ---
@@ -72,6 +72,7 @@ Files::File.download(path,
72
72
  * `path` (string): Required - Path to operate on.
73
73
  * `action` (string): Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
74
74
  * `id` (int64): If provided, lookup the file by id instead of path.
75
+ * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
75
76
  * `with_previews` (boolean): Include file preview information?
76
77
  * `with_priority_color` (boolean): Include file priority color information?
77
78
 
@@ -164,6 +165,7 @@ file.download(
164
165
  * `path` (string): Required - Path to operate on.
165
166
  * `action` (string): Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
166
167
  * `id` (int64): If provided, lookup the file by id instead of path.
168
+ * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
167
169
  * `with_previews` (boolean): Include file preview information?
168
170
  * `with_priority_color` (boolean): Include file priority color information?
169
171
 
@@ -6,7 +6,8 @@
6
6
 
7
7
  ```
8
8
  Files::FileAction.copy(path,
9
- destination: "destination"
9
+ destination: "destination",
10
+ structure: true
10
11
  )
11
12
  ```
12
13
 
@@ -14,6 +15,7 @@ Files::FileAction.copy(path,
14
15
 
15
16
  * `path` (string): Required - Path to operate on.
16
17
  * `destination` (string): Required - Copy destination path.
18
+ * `structure` (boolean): Copy structure only?
17
19
 
18
20
 
19
21
  ---
@@ -66,7 +68,8 @@ Files::FileAction.begin_upload(path,
66
68
  file_action = Files::FileAction.list_for(path).first
67
69
 
68
70
  file_action.copy(
69
- destination: "destination"
71
+ destination: "destination",
72
+ structure: true
70
73
  )
71
74
  ```
72
75
 
@@ -74,6 +77,7 @@ file_action.copy(
74
77
 
75
78
  * `path` (string): Required - Path to operate on.
76
79
  * `destination` (string): Required - Copy destination path.
80
+ * `structure` (boolean): Copy structure only?
77
81
 
78
82
 
79
83
  ---
@@ -57,6 +57,7 @@ Files::Folder.list_for(path,
57
57
  page: 1,
58
58
  per_page: 1,
59
59
  search_all: true,
60
+ with_previews: true,
60
61
  with_priority_color: true
61
62
  )
62
63
  ```
@@ -72,6 +73,7 @@ Files::Folder.list_for(path,
72
73
  * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
73
74
  * `search` (string): If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
74
75
  * `search_all` (boolean): Search entire site?
76
+ * `with_previews` (boolean): Include file previews?
75
77
  * `with_priority_color` (boolean): Include file priority color information?
76
78
 
77
79
 
@@ -69,12 +69,17 @@ Files::GroupUser.update(id,
69
69
  ## Delete Group User
70
70
 
71
71
  ```
72
- Files::GroupUser.delete(id)
72
+ Files::GroupUser.delete(id,
73
+ group_id: 1,
74
+ user_id: 1
75
+ )
73
76
  ```
74
77
 
75
78
  ### Parameters
76
79
 
77
80
  * `id` (int64): Required - Group User ID.
81
+ * `group_id` (int64): Required - Group ID from which to remove user.
82
+ * `user_id` (int64): Required - User ID to remove from group.
78
83
 
79
84
 
80
85
  ---
@@ -106,9 +111,14 @@ group_user.update(
106
111
  ```
107
112
  group_user = Files::GroupUser.list_for(path).first
108
113
 
109
- group_user.delete
114
+ group_user.delete(
115
+ group_id: 1,
116
+ user_id: 1
117
+ )
110
118
  ```
111
119
 
112
120
  ### Parameters
113
121
 
114
122
  * `id` (int64): Required - Group User ID.
123
+ * `group_id` (int64): Required - Group ID from which to remove user.
124
+ * `user_id` (int64): Required - User ID to remove from group.
@@ -124,6 +124,7 @@ Files::User.list(
124
124
  * `page` (int64): Current page number.
125
125
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
126
126
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
127
+ * `ids` (string): comma-separated list of User IDs
127
128
  * `q[username]` (string): List users matching username.
128
129
  * `q[email]` (string): List users matching email.
129
130
  * `q[notes]` (string): List users matching notes field.
@@ -66,12 +66,16 @@ module Files
66
66
  # Parameters:
67
67
  # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
68
68
  # attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
69
+ # behavior - string - Behavior type.
70
+ # path - string - Folder behaviors path.
69
71
  def update(params = {})
70
72
  params ||= {}
71
73
  params[:id] = @attributes[:id]
72
74
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
73
75
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
74
76
  raise InvalidParameterError.new("Bad parameter: value must be an String") if params.dig(:value) and !params.dig(:value).is_a?(String)
77
+ raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params.dig(:behavior) and !params.dig(:behavior).is_a?(String)
78
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
75
79
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
76
80
 
77
81
  Api.send_request("/behaviors/#{@attributes[:id]}", :patch, params, @options)
@@ -183,12 +187,14 @@ module Files
183
187
  # encoding - string - HTTP encoding method. Can be JSON, XML, or RAW (form data).
184
188
  # headers - object - Additional request headers.
185
189
  # body - object - Additional body parameters.
190
+ # action - string - action for test body
186
191
  def self.webhook_test(params = {}, options = {})
187
192
  raise InvalidParameterError.new("Bad parameter: url must be an String") if params.dig(:url) and !params.dig(:url).is_a?(String)
188
193
  raise InvalidParameterError.new("Bad parameter: method must be an String") if params.dig(:method) and !params.dig(:method).is_a?(String)
189
194
  raise InvalidParameterError.new("Bad parameter: encoding must be an String") if params.dig(:encoding) and !params.dig(:encoding).is_a?(String)
190
195
  raise InvalidParameterError.new("Bad parameter: headers must be an Hash") if params.dig(:headers) and !params.dig(:headers).is_a?(Hash)
191
196
  raise InvalidParameterError.new("Bad parameter: body must be an Hash") if params.dig(:body) and !params.dig(:body).is_a?(Hash)
197
+ raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
192
198
  raise MissingParameterError.new("Parameter missing: url") unless params.dig(:url)
193
199
 
194
200
  response, _options = Api.send_request("/behaviors/webhook/test", :post, params, options)
@@ -198,12 +204,15 @@ module Files
198
204
  # Parameters:
199
205
  # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
200
206
  # attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
207
+ # behavior - string - Behavior type.
208
+ # path - string - Folder behaviors path.
201
209
  def self.update(id, params = {}, options = {})
202
210
  params ||= {}
203
211
  params[:id] = id
204
212
  raise InvalidParameterError.new("Bad parameter: id must be one of String, Integer, Hash") if params.dig(:id) and [ String, Integer, Hash ].none? { |klass| params.dig(:id).is_a?(klass) }
205
213
  raise InvalidParameterError.new("Bad parameter: value must be an String") if params.dig(:value) and !params.dig(:value).is_a?(String)
206
- raise InvalidParameterError.new("Bad parameter: attachment_file must be one of String, Integer, Hash") if params.dig(:attachment_file) and [ String, Integer, Hash ].none? { |klass| params.dig(:attachment_file).is_a?(klass) }
214
+ raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params.dig(:behavior) and !params.dig(:behavior).is_a?(String)
215
+ raise InvalidParameterError.new("Bad parameter: path must be one of String, Integer, Hash") if params.dig(:path) and [ String, Integer, Hash ].none? { |klass| params.dig(:path).is_a?(klass) }
207
216
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
208
217
 
209
218
  response, options = Api.send_request("/behaviors/#{params[:id]}", :patch, params, options)
@@ -827,6 +827,7 @@ module Files
827
827
  # Parameters:
828
828
  # action - string - Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
829
829
  # id - int64 - If provided, lookup the file by id instead of path.
830
+ # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
830
831
  # with_previews - boolean - Include file preview information?
831
832
  # with_priority_color - boolean - Include file priority color information?
832
833
  def download(params = {})
@@ -836,6 +837,7 @@ module Files
836
837
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
837
838
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
838
839
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
840
+ raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
839
841
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
840
842
 
841
843
  Api.send_request("/files/#{Addressable::URI.encode_component(params[:path])}", :get, params, @options)
@@ -886,6 +888,7 @@ module Files
886
888
  # Parameters:
887
889
  # action - string - Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
888
890
  # id - int64 - If provided, lookup the file by id instead of path.
891
+ # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
889
892
  # with_previews - boolean - Include file preview information?
890
893
  # with_priority_color - boolean - Include file priority color information?
891
894
  def self.download(path, params = {}, options = {})
@@ -894,6 +897,7 @@ module Files
894
897
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
895
898
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
896
899
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
900
+ raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
897
901
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
898
902
 
899
903
  response, options = Api.send_request("/files/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
@@ -13,6 +13,7 @@ module Files
13
13
  #
14
14
  # Parameters:
15
15
  # destination (required) - string - Copy destination path.
16
+ # structure - boolean - Copy structure only?
16
17
  def copy(params = {})
17
18
  params ||= {}
18
19
  params[:path] = @attributes[:path]
@@ -68,6 +69,7 @@ module Files
68
69
  #
69
70
  # Parameters:
70
71
  # destination (required) - string - Copy destination path.
72
+ # structure - boolean - Copy structure only?
71
73
  def self.copy(path, params = {}, options = {})
72
74
  params ||= {}
73
75
  params[:path] = path
@@ -322,6 +322,7 @@ module Files
322
322
  # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
323
323
  # search - string - If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
324
324
  # search_all - boolean - Search entire site?
325
+ # with_previews - boolean - Include file previews?
325
326
  # with_priority_color - boolean - Include file priority color information?
326
327
  def self.list_for(path, params = {}, options = {})
327
328
  params ||= {}
@@ -81,12 +81,19 @@ module Files
81
81
  Api.send_request("/group_users/#{@attributes[:id]}", :patch, params, @options)
82
82
  end
83
83
 
84
+ # Parameters:
85
+ # group_id (required) - int64 - Group ID from which to remove user.
86
+ # user_id (required) - int64 - User ID to remove from group.
84
87
  def delete(params = {})
85
88
  params ||= {}
86
89
  params[:id] = @attributes[:id]
87
90
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
88
91
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
92
+ raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
93
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
89
94
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
95
+ raise MissingParameterError.new("Parameter missing: group_id") unless params.dig(:group_id)
96
+ raise MissingParameterError.new("Parameter missing: user_id") unless params.dig(:user_id)
90
97
 
91
98
  Api.send_request("/group_users/#{@attributes[:id]}", :delete, params, @options)
92
99
  end
@@ -140,11 +147,18 @@ module Files
140
147
  GroupUser.new(response.data, options)
141
148
  end
142
149
 
150
+ # Parameters:
151
+ # group_id (required) - int64 - Group ID from which to remove user.
152
+ # user_id (required) - int64 - User ID to remove from group.
143
153
  def self.delete(id, params = {}, options = {})
144
154
  params ||= {}
145
155
  params[:id] = id
146
156
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
157
+ raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
158
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
147
159
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
160
+ raise MissingParameterError.new("Parameter missing: group_id") unless params.dig(:group_id)
161
+ raise MissingParameterError.new("Parameter missing: user_id") unless params.dig(:user_id)
148
162
 
149
163
  response, _options = Api.send_request("/group_users/#{params[:id]}", :delete, params, options)
150
164
  response.data
@@ -615,6 +615,7 @@ module Files
615
615
  # page - int64 - Current page number.
616
616
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
617
617
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
618
+ # ids - string - comma-separated list of User IDs
618
619
  # q[username] - string - List users matching username.
619
620
  # q[email] - string - List users matching email.
620
621
  # q[notes] - string - List users matching notes field.
@@ -629,6 +630,7 @@ module Files
629
630
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
630
631
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
631
632
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
633
+ raise InvalidParameterError.new("Bad parameter: ids must be an String") if params.dig(:ids) and !params.dig(:ids).is_a?(String)
632
634
  raise InvalidParameterError.new("Bad parameter: search must be an String") if params.dig(:search) and !params.dig(:search).is_a?(String)
633
635
 
634
636
  response, options = Api.send_request("/users", :get, params, options)
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.82
4
+ version: 1.0.83
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2020-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable