files.com 1.1.130 → 1.1.132
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 +4 -4
- data/README.md +87 -0
- data/_VERSION +1 -1
- data/docs/bundle_download.md +17 -1
- data/lib/files.com/version.rb +1 -1
- 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: fa62fc64b293c5a220f872b73b105ec87e7f2dcd75301876507127a94f9b77e7
|
4
|
+
data.tar.gz: 5b4ffc31a1cfe804b2e5d319c2af94367ef81adbd2180f0452c74f9f13d164c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 015fc04012521d6d7f992a02510cde14c4662443cbf44ca01591085bc5c6768f4b204217c384d19dc731fe56ff3c964534adddfa2033a32d3cb064d19123fb33
|
7
|
+
data.tar.gz: 14a14f79dae2222ca4096c12e820af9020d85d42ad14b9ec7e5034a8026cdf556ce9411bb02f4df481f3a617719ba719e5db6680f2021f16033b6f2cffe45678
|
data/README.md
CHANGED
@@ -192,6 +192,93 @@ Maximum number of retries. The default value is 3.
|
|
192
192
|
Files.max_network_retries = 5
|
193
193
|
```
|
194
194
|
|
195
|
+
## Sort and Filter
|
196
|
+
|
197
|
+
Several of the Files.com API resources have list operations that return multiple instances of the resource. The List operations
|
198
|
+
can be sorted and filtered.
|
199
|
+
|
200
|
+
### Sorting
|
201
|
+
|
202
|
+
The returned data can be sorted by passing in the ```sort_by``` method argument.
|
203
|
+
|
204
|
+
The argument value is a Ruby hash that has a key of the resource field name to sort on and a value of either ```"asc"``` or ```"desc"``` to specify the sort order.
|
205
|
+
|
206
|
+
Each resource has a set of valid fields for sorting and can be sorted by one field at a time.
|
207
|
+
|
208
|
+
### Filters
|
209
|
+
|
210
|
+
Filters apply selection criteria to the underlying query that returns the results. Filters can be applied individually to select resource fields
|
211
|
+
and/or in a combination with each other. The results of applying filters and filter combinations can be sorted by a single field.
|
212
|
+
|
213
|
+
The passed in argument value is a Ruby hash that has a key of the resource field name to filter on and a passed in value to use in the filter comparison.
|
214
|
+
|
215
|
+
Each resource has their own set of valid filters and fields, valid combinations of filters, and sortable fields.
|
216
|
+
|
217
|
+
#### Types of Filters
|
218
|
+
|
219
|
+
##### Exact Filter
|
220
|
+
|
221
|
+
`filter` - find resources that have an exact field value match to a passed in value. (i.e., FIELD_VALUE = PASS_IN_VALUE).
|
222
|
+
|
223
|
+
#### Range Filters
|
224
|
+
|
225
|
+
`filter_gt` - find resources that have a field value that is greater than the passed in value. (i.e., FIELD_VALUE > PASS_IN_VALUE).
|
226
|
+
|
227
|
+
`filter_gte` - find resources that have a field value that is greater than or equal to the passed in value. (i.e., FIELD_VALUE >= PASS_IN_VALUE).
|
228
|
+
|
229
|
+
`filter_lt` - find resources that have a field value that is less than the passed in value. (i.e., FIELD_VALUE < PASS_IN_VALUE).
|
230
|
+
|
231
|
+
`filter_lte` - find resources that have a field value that is less than or equal to the passed in value. (i.e., FIELD_VALUE \<= PASS_IN_VALUE).
|
232
|
+
|
233
|
+
##### Pattern Filter
|
234
|
+
|
235
|
+
`filter_prefix` - find resources where the specified field is prefixed by the supplied value. This is applicable to values that are strings.
|
236
|
+
|
237
|
+
```ruby title="Sort Example"
|
238
|
+
## users sorted by username
|
239
|
+
Files.api_key = 'YOUR_API_KEY'
|
240
|
+
Files::User.list(
|
241
|
+
sort_by: { "username": "asc"}
|
242
|
+
)
|
243
|
+
```
|
244
|
+
|
245
|
+
```ruby title="Exact Filter Example"
|
246
|
+
## non admin users
|
247
|
+
Files.api_key = 'YOUR_API_KEY'
|
248
|
+
Files::User.list(
|
249
|
+
filter: { not_site_admin: true },
|
250
|
+
sort_by: { "username": "asc"}
|
251
|
+
)
|
252
|
+
```
|
253
|
+
|
254
|
+
```ruby title="Range Filter Example"
|
255
|
+
#users who haven't logged in since 2024-01-01
|
256
|
+
Files.api_key = 'YOUR_API_KEY'
|
257
|
+
Files::User.list(
|
258
|
+
filter_gte: { "last_login_at": "2024-01-01" },
|
259
|
+
sort_by: { "last_login_at": "asc"}
|
260
|
+
)
|
261
|
+
```
|
262
|
+
|
263
|
+
```ruby title="Pattern Filter Example"
|
264
|
+
## users who usernames start with 'test'
|
265
|
+
Files.api_key = 'YOUR_API_KEY'
|
266
|
+
Files::User.list(
|
267
|
+
filter_pre: { username: "test" },
|
268
|
+
sort_by: { "username": "asc"}
|
269
|
+
)
|
270
|
+
```
|
271
|
+
|
272
|
+
```ruby title="Combined Filter Example"
|
273
|
+
## users who usernames start with 'test' and are not admins
|
274
|
+
Files.api_key = 'YOUR_API_KEY'
|
275
|
+
Files::User.list(
|
276
|
+
filter_prefix: { username: "test" },
|
277
|
+
filter: { not_site_admin: true },
|
278
|
+
sort_by: { "username": "asc"}
|
279
|
+
)
|
280
|
+
```
|
281
|
+
|
195
282
|
## Errors
|
196
283
|
|
197
284
|
The Files.com Ruby SDK will return errors by raising exceptions. There are many exception classes defined in the Files SDK that correspond
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.132
|
data/docs/bundle_download.md
CHANGED
@@ -4,7 +4,23 @@
|
|
4
4
|
|
5
5
|
```
|
6
6
|
{
|
7
|
-
"bundle_registration":
|
7
|
+
"bundle_registration": {
|
8
|
+
"code": "abc123",
|
9
|
+
"name": "account",
|
10
|
+
"company": "Action Verb",
|
11
|
+
"email": "john.doe@files.com",
|
12
|
+
"ip": "10.1.1.1",
|
13
|
+
"inbox_code": "abc123",
|
14
|
+
"clickwrap_body": "example",
|
15
|
+
"form_field_set_id": 1,
|
16
|
+
"form_field_data": {
|
17
|
+
"key": "example value"
|
18
|
+
},
|
19
|
+
"bundle_code": "example",
|
20
|
+
"bundle_id": 1,
|
21
|
+
"bundle_recipient_id": 1,
|
22
|
+
"created_at": "2000-01-01T01:00:00Z"
|
23
|
+
},
|
8
24
|
"download_method": "file",
|
9
25
|
"path": "a/b/test.txt",
|
10
26
|
"created_at": "2000-01-01T01:00:00Z"
|
data/lib/files.com/version.rb
CHANGED
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.1.
|
4
|
+
version: 1.1.132
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|