files.com 1.0.47 → 1.0.48

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: 0650df0e6a60899419ee155a83fd433f3eb94660d412c5d54657ceb19e1b4238
4
- data.tar.gz: 295405a4a24f56bee32d933d05dc65b542ed4800ee06b23d4a1debc25f4635e5
3
+ metadata.gz: bd5d210bd31fa2d96121e041563217426bd169a735305cc49ccc893226864d7f
4
+ data.tar.gz: 6cf59ba20af0696ed50c17091b8d81db7d72f38fc7296f4d82236e5d31cf88db
5
5
  SHA512:
6
- metadata.gz: 31fa63fa0a4b0cc641c35801b66ffb0f712c69f96acb781f0fbbf40a335cbd87968146a192d4ba4b0df885c627d78e2f6652b716e0d6f1212a87d22f028accd9
7
- data.tar.gz: c387cd733684e651dd18c79b34c074d72c4280c72893ce160159be7def0b252c012e08291e34789e20c270b3ec0d12ad9d9c0b1eb3fb8104fc505e0097e09513
6
+ metadata.gz: e73fe8f90c25f4c3072e36870d5305f7a6cff22deaed1e4e63b9c422f823b68bb1c2be85bc56bc43b0ab18e222669d73798159b7a1bb1c9eabb85e58ad389cdd
7
+ data.tar.gz: 9cbe911c109a82784c4f75de9fcf4fb9f1842e5ba50cb50c9a588aa7c44c19240276836e56d2c9912c5bda0f2b512105e1080607b258dde37336a28fc368da76
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.47
1
+ 1.0.48
data/docs/file.md CHANGED
@@ -167,42 +167,6 @@ file.download(
167
167
  * `with_priority_color` (boolean): Include file priority color information?
168
168
 
169
169
 
170
- ---
171
-
172
- ## Upload file
173
-
174
- ```
175
- file = Files::File.find(1)
176
- file.create(
177
- length: 1,
178
- mkdir_parents: true,
179
- part: 1,
180
- parts: 1,
181
- provided_mtime: "2000-01-01T01:00:00Z",
182
- restart: 1,
183
- size: 1,
184
- with_rename: true
185
- )
186
- ```
187
-
188
- ### Parameters
189
-
190
- * `path` (string): Required - Path to operate on.
191
- * `action` (string): The action to perform. Can be `append`, `attachment`, `end`, `upload`, `put`, or may not exist
192
- * `etags[etag]` (array(string)): etag identifier.
193
- * `etags[part]` (array(int64)): Part number.
194
- * `length` (int64): Length of file.
195
- * `mkdir_parents` (boolean): Create parent directories if they do not exist?
196
- * `part` (int64): Part if uploading a part.
197
- * `parts` (int64): How many parts to fetch?
198
- * `provided_mtime` (string): User provided modification time.
199
- * `ref` (string):
200
- * `restart` (int64): File byte offset to restart from.
201
- * `size` (int64): Size of file.
202
- * `structure` (string): If copying folder, copy just the structure?
203
- * `with_rename` (boolean): Allow file rename instead of overwrite?
204
-
205
-
206
170
  ---
207
171
 
208
172
  ## Update file/folder metadata
data/docs/folder.md CHANGED
@@ -86,17 +86,3 @@ Files::Folder.create(path)
86
86
  ### Parameters
87
87
 
88
88
  * `path` (string): Required - Path to operate on.
89
-
90
-
91
- ---
92
-
93
- ## Create folder
94
-
95
- ```
96
- folder = Files::Folder.find(1)
97
- folder.create
98
- ```
99
-
100
- ### Parameters
101
-
102
- * `path` (string): Required - Path to operate on.
data/docs/lock.md CHANGED
@@ -80,23 +80,6 @@ Files::Lock.delete(path,
80
80
  * `token` (string): Required - Lock token
81
81
 
82
82
 
83
- ---
84
-
85
- ## Create Lock
86
-
87
- ```
88
- lock = Files::Lock.find(1)
89
- lock.create(
90
- timeout: 1
91
- )
92
- ```
93
-
94
- ### Parameters
95
-
96
- * `path` (string): Required - Path
97
- * `timeout` (int64): Lock timeout length
98
-
99
-
100
83
  ---
101
84
 
102
85
  ## Delete Lock
data/docs/permission.md CHANGED
@@ -85,28 +85,3 @@ Files::Permission.delete(id)
85
85
  ### Parameters
86
86
 
87
87
  * `id` (int64): Required - Permission ID.
88
-
89
-
90
- ---
91
-
92
- ## Create Permission
93
-
94
- ```
95
- permission = Files::Permission.find(1)
96
- permission.create(
97
- group_id: 1,
98
- permission: "full",
99
- recursive: true,
100
- user_id: 1,
101
- username: "Sser"
102
- )
103
- ```
104
-
105
- ### Parameters
106
-
107
- * `group_id` (int64): Group ID
108
- * `path` (string): Folder path
109
- * `permission` (string): Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `previewonly`, or `history`
110
- * `recursive` (boolean): Apply to subfolders recursively?
111
- * `user_id` (int64): User ID. Provide `username` or `user_id`
112
- * `username` (string): User username. Provide `username` or `user_id`
data/docs/request.md CHANGED
@@ -116,22 +116,3 @@ request.folders(
116
116
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
117
117
  * `mine` (boolean): Only show requests of the current user? (Defaults to true if current user is not a site admin.)
118
118
  * `path` (string): Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
119
-
120
-
121
- ---
122
-
123
- ## Create Request
124
-
125
- ```
126
- request = Files::Request.find(1)
127
- request.create(
128
- destination: "destination"
129
- )
130
- ```
131
-
132
- ### Parameters
133
-
134
- * `path` (string): Required - Folder path on which to request the file.
135
- * `destination` (string): Required - Destination filename (without extension) to request.
136
- * `user_ids` (string): A list of user IDs to request the file from. If sent as a string, it should be comma-delimited.
137
- * `group_ids` (string): A list of group IDs to request the file from. If sent as a string, it should be comma-delimited.
@@ -840,41 +840,6 @@ module Files
840
840
  Api.send_request("/files/#{Addressable::URI.encode_component(params[:path])}", :get, params, @options)
841
841
  end
842
842
 
843
- # Upload file
844
- #
845
- # Parameters:
846
- # action - string - The action to perform. Can be `append`, `attachment`, `end`, `upload`, `put`, or may not exist
847
- # etags[etag] (required) - array - etag identifier.
848
- # etags[part] (required) - array - Part number.
849
- # length - integer - Length of file.
850
- # mkdir_parents - boolean - Create parent directories if they do not exist?
851
- # part - integer - Part if uploading a part.
852
- # parts - integer - How many parts to fetch?
853
- # provided_mtime - string - User provided modification time.
854
- # ref - string -
855
- # restart - integer - File byte offset to restart from.
856
- # size - integer - Size of file.
857
- # structure - string - If copying folder, copy just the structure?
858
- # with_rename - boolean - Allow file rename instead of overwrite?
859
- def create(params = {})
860
- params ||= {}
861
- params[:path] = @attributes[:path]
862
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
863
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
864
- raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
865
- raise InvalidParameterError.new("Bad parameter: length must be an Integer") if params.dig(:length) and !params.dig(:length).is_a?(Integer)
866
- raise InvalidParameterError.new("Bad parameter: part must be an Integer") if params.dig(:part) and !params.dig(:part).is_a?(Integer)
867
- raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
868
- raise InvalidParameterError.new("Bad parameter: provided_mtime must be an String") if params.dig(:provided_mtime) and !params.dig(:provided_mtime).is_a?(String)
869
- raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
870
- raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
871
- raise InvalidParameterError.new("Bad parameter: size must be an Integer") if params.dig(:size) and !params.dig(:size).is_a?(Integer)
872
- raise InvalidParameterError.new("Bad parameter: structure must be an String") if params.dig(:structure) and !params.dig(:structure).is_a?(String)
873
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
874
-
875
- Api.send_request("/files/#{Addressable::URI.encode_component(params[:path])}", :post, params, @options)
876
- end
877
-
878
843
  # Parameters:
879
844
  # provided_mtime - string - Modified time of file.
880
845
  # priority_color - string - Priority/Bookmark color of file.
@@ -934,9 +899,8 @@ module Files
934
899
  File.new(response.data, options)
935
900
  end
936
901
 
937
- # Upload file
938
- #
939
902
  # Parameters:
903
+ # path (required) - string - Path to operate on.
940
904
  # action - string - The action to perform. Can be `append`, `attachment`, `end`, `upload`, `put`, or may not exist
941
905
  # etags[etag] (required) - array - etag identifier.
942
906
  # etags[part] (required) - array - Part number.
@@ -302,17 +302,6 @@ module Files
302
302
  @attributes[:preview] = value
303
303
  end
304
304
 
305
- # Create folder
306
- def create(params = {})
307
- params ||= {}
308
- params[:path] = @attributes[:path]
309
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
310
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
311
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
312
-
313
- Api.send_request("/folders/#{Addressable::URI.encode_component(params[:path])}", :post, params, @options)
314
- end
315
-
316
305
  def save
317
306
  if @attributes[:path]
318
307
  raise NotImplementedError.new("The Folder object doesn't support updates.")
@@ -351,7 +340,8 @@ module Files
351
340
  end
352
341
  end
353
342
 
354
- # Create folder
343
+ # Parameters:
344
+ # path (required) - string - Path to operate on.
355
345
  def self.create(path, params = {}, options = {})
356
346
  params ||= {}
357
347
  params[:path] = path
@@ -90,21 +90,6 @@ module Files
90
90
  @attributes[:username] = value
91
91
  end
92
92
 
93
- # Create Lock
94
- #
95
- # Parameters:
96
- # timeout - integer - Lock timeout length
97
- def create(params = {})
98
- params ||= {}
99
- params[:path] = @attributes[:path]
100
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
101
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
102
- raise InvalidParameterError.new("Bad parameter: timeout must be an Integer") if params.dig(:timeout) and !params.dig(:timeout).is_a?(Integer)
103
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
104
-
105
- Api.send_request("/locks/#{Addressable::URI.encode_component(params[:path])}", :post, params, @options)
106
- end
107
-
108
93
  # Parameters:
109
94
  # token (required) - string - Lock token
110
95
  def delete(params = {})
@@ -150,9 +135,8 @@ module Files
150
135
  response, options = Api.send_request("/locks/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
151
136
  end
152
137
 
153
- # Create Lock
154
- #
155
138
  # Parameters:
139
+ # path (required) - string - Path
156
140
  # timeout - integer - Lock timeout length
157
141
  def self.create(path, params = {}, options = {})
158
142
  params ||= {}
@@ -81,27 +81,6 @@ module Files
81
81
  @attributes[:recursive] = value
82
82
  end
83
83
 
84
- # Create Permission
85
- #
86
- # Parameters:
87
- # group_id - integer - Group ID
88
- # permission - string - Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `previewonly`, or `history`
89
- # recursive - boolean - Apply to subfolders recursively?
90
- # user_id - integer - User ID. Provide `username` or `user_id`
91
- # username - string - User username. Provide `username` or `user_id`
92
- def create(params = {})
93
- params ||= {}
94
- params[:path] = @attributes[:path]
95
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
96
- raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
97
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
98
- raise InvalidParameterError.new("Bad parameter: permission must be an String") if params.dig(:permission) and !params.dig(:permission).is_a?(String)
99
- raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
100
- raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String)
101
-
102
- Api.send_request("/permissions", :post, params, @options)
103
- end
104
-
105
84
  def save
106
85
  if @attributes[:path]
107
86
  raise NotImplementedError.new("The Permission object doesn't support updates.")
@@ -136,10 +115,9 @@ module Files
136
115
  list(path, params, options)
137
116
  end
138
117
 
139
- # Create Permission
140
- #
141
118
  # Parameters:
142
119
  # group_id - integer - Group ID
120
+ # path - string - Folder path
143
121
  # permission - string - Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `previewonly`, or `history`
144
122
  # recursive - boolean - Apply to subfolders recursively?
145
123
  # user_id - integer - User ID. Provide `username` or `user_id`
@@ -100,26 +100,6 @@ module Files
100
100
  Api.send_request("/requests/folders/#{Addressable::URI.encode_component(params[:path])}", :get, params, @options)
101
101
  end
102
102
 
103
- # Create Request
104
- #
105
- # Parameters:
106
- # destination (required) - string - Destination filename (without extension) to request.
107
- # user_ids - string - A list of user IDs to request the file from. If sent as a string, it should be comma-delimited.
108
- # group_ids - string - A list of group IDs to request the file from. If sent as a string, it should be comma-delimited.
109
- def create(params = {})
110
- params ||= {}
111
- params[:path] = @attributes[:path]
112
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
113
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
114
- raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
115
- raise InvalidParameterError.new("Bad parameter: user_ids must be an String") if params.dig(:user_ids) and !params.dig(:user_ids).is_a?(String)
116
- raise InvalidParameterError.new("Bad parameter: group_ids must be an String") if params.dig(:group_ids) and !params.dig(:group_ids).is_a?(String)
117
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
118
- raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
119
-
120
- Api.send_request("/requests", :post, params, @options)
121
- end
122
-
123
103
  def save
124
104
  if @attributes[:path]
125
105
  raise NotImplementedError.new("The Request object doesn't support updates.")
@@ -168,9 +148,8 @@ module Files
168
148
  response, options = Api.send_request("/requests/folders/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
169
149
  end
170
150
 
171
- # Create Request
172
- #
173
151
  # Parameters:
152
+ # path (required) - string - Folder path on which to request the file.
174
153
  # destination (required) - string - Destination filename (without extension) to request.
175
154
  # user_ids - string - A list of user IDs to request the file from. If sent as a string, it should be comma-delimited.
176
155
  # group_ids - string - A list of group IDs to request the file from. If sent as a string, it should be comma-delimited.
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.47
4
+ version: 1.0.48
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-05-16 00:00:00.000000000 Z
11
+ date: 2020-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday