files.com 1.0.37 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0eddd8414056371480f1e28f70a4b7db7d1e49ba4eada9f98733e1d1636e5f28
4
- data.tar.gz: 8098b511025d04917dce2a299d1c5b0016c60accadf710d4eea117d42b2b1e85
3
+ metadata.gz: 3850eeb0d72696cee43992b655219b262069664be3b8cea9dba325395d70ef88
4
+ data.tar.gz: ac73afe30cf5f291d5d9bb01d80ff50f6a131b0365fe41b7d2f811c405abe0f5
5
5
  SHA512:
6
- metadata.gz: 34acba5bd568cd1f1e07f6a26290fca646476fda38eedab3e7ebaf0c8fb6b6ef7d2e837e1a5cdf2984f7a4ffb5c0cb7e8452a02e3713dc3bc0788cad69afa710
7
- data.tar.gz: 42d1798ee48f1315543a08a1321244b9527f289b84e7d48c9d16297bdb8c78bdbf3d64baf37c2554cdc554eee5156f5968af470de84932d0189e0219be6ab0ab
6
+ metadata.gz: 80fd56f2cceb04993d5ffd847afa210bdc68165a9767b57e5b63ed25f0ffe1330c9f4909da4dc92b07742875d73a071561a029ad381755c53c2c5044bb23ce09
7
+ data.tar.gz: e6d08426954951420ba24309914753e71a046786a5569b37e428b26adf461da09bbdf6a309e369a4a0108272f5b5eb748153548bdead65255d0a45f699db1c75
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.37
1
+ 1.0.38
data/docs/request.md CHANGED
@@ -28,7 +28,7 @@
28
28
  ## List Requests
29
29
 
30
30
  ```
31
- Files::Request.list(
31
+ Files::Request.list(path,
32
32
  page: 1,
33
33
  per_page: 1,
34
34
  mine: true
@@ -41,27 +41,7 @@ Files::Request.list(
41
41
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
42
42
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
43
43
  * `mine` (boolean): Only show requests of the current user? (Defaults to true if current user is not a site admin.)
44
-
45
-
46
- ---
47
-
48
- ## List Requests by path
49
-
50
- ```
51
- Files::Request.list_for(path,
52
- page: 1,
53
- per_page: 1,
54
- mine: true
55
- )
56
- ```
57
-
58
- ### Parameters
59
-
60
- * `page` (int64): Current page number.
61
- * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
62
- * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
63
- * `path` (string): Required - Path to operate on.
64
- * `mine` (boolean): Only show requests of the current user? (Defaults to true if current user is not a site admin.)
44
+ * `path` (string): Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
65
45
 
66
46
 
67
47
  ---
@@ -115,34 +115,20 @@ module Files
115
115
  # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
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
- def self.list(params = {}, options = {})
119
- raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
120
- raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
121
- raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
122
-
123
- response, options = Api.send_request("/requests", :get, params, options)
124
- end
125
-
126
- def self.all(params = {}, options = {})
127
- list(params, options)
128
- end
129
-
130
- # Parameters:
131
- # page - integer - Current page number.
132
- # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
133
- # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
134
- # path (required) - string - Path to operate on.
135
- # mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
136
- def self.list_for(path, params = {}, options = {})
118
+ # path - string - Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
119
+ def self.list(path, params = {}, options = {})
137
120
  params ||= {}
138
121
  params[:path] = path
139
122
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
140
123
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
141
124
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
142
125
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
143
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
144
126
 
145
- response, options = Api.send_request("/requests/folders/#{URI.encode_www_form_component(params[:path])}", :get, params, options)
127
+ response, options = Api.send_request("/requests", :get, params, options)
128
+ end
129
+
130
+ def self.all(path, params = {}, options = {})
131
+ list(path, params, options)
146
132
  end
147
133
 
148
134
  # Create Request
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.37
4
+ version: 1.0.38
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-09 00:00:00.000000000 Z
11
+ date: 2020-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday