files.com 1.0.341 → 1.0.343
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/_VERSION +1 -1
- data/docs/behavior.md +1 -1
- data/docs/folder.md +1 -1
- data/docs/snapshot.md +17 -0
- data/lib/files.com/models/behavior.rb +1 -1
- data/lib/files.com/models/folder.rb +1 -1
- data/lib/files.com/models/snapshot.rb +54 -8
- 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: c71156389e0b6234b60ed41cfb6a47c63d40733c7510e8ab5fb6aaf9b0994c24
|
4
|
+
data.tar.gz: 10b5604e99412b84b1011ceea259c14a111c4a5a6196430a4fce201ccbfaa1a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a2746cc39fcf8518b8d3e5cdbda82ded80e1f0ac5bf130728c49e708bc4ca856cc2f39826f54c590f4702dd2c13ea991a5d00c08d24156bf673d180565ed1b2
|
7
|
+
data.tar.gz: d5851ae9f52779f23fd9e04a45ab22e8e890d05a145455cf450395ef8b1aa266a1f10466b6f226d3349e62d84a59aab31d1c50bd44656baf803f4c7a69545244
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.343
|
data/docs/behavior.md
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
```
|
18
18
|
|
19
19
|
* `id` (int64): Folder behavior ID
|
20
|
-
* `path` (string): Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
20
|
+
* `path` (string): Folder path. Note that Behavior paths cannot be updated once initially set. You will need to remove and re-create the behavior on the new path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
21
21
|
* `attachment_url` (string): URL for attached file
|
22
22
|
* `behavior` (string): Behavior type.
|
23
23
|
* `name` (string): Name for this behavior.
|
data/docs/folder.md
CHANGED
@@ -75,7 +75,7 @@ Files::Folder.list_for(path,
|
|
75
75
|
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
76
76
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
77
77
|
* `path` (string): Required - Path to operate on.
|
78
|
-
* `filter` (string): If specified, will filter folders/files list by
|
78
|
+
* `filter` (string): If specified, will filter folders/files list by name. Ignores text before last `/`. Wildcards of `*` and `?` are acceptable here.
|
79
79
|
* `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
80
80
|
* `sort_by` (object): Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
|
81
81
|
* `search` (string): If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
|
data/docs/snapshot.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Snapshot
|
2
2
|
|
3
|
+
## Example Snapshot Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"expires_at": "2000-01-01T01:00:00Z",
|
8
|
+
"finalized_at": "2000-01-01T01:00:00Z",
|
9
|
+
"name": "My Snapshot",
|
10
|
+
"user_id": 1,
|
11
|
+
"bundle_id": 1
|
12
|
+
}
|
13
|
+
```
|
14
|
+
|
15
|
+
* `expires_at` (date-time): When the snapshot expires.
|
16
|
+
* `finalized_at` (date-time): When the snapshot was finalized.
|
17
|
+
* `name` (string): A name for the snapshot.
|
18
|
+
* `user_id` (int64): The user that created this snapshot, if applicable.
|
19
|
+
* `bundle_id` (int64): The bundle using this snapshot, if applicable.
|
3
20
|
* `id` (int64): Snapshot ID.
|
4
21
|
|
5
22
|
|
@@ -18,7 +18,7 @@ module Files
|
|
18
18
|
@attributes[:id] = value
|
19
19
|
end
|
20
20
|
|
21
|
-
# string - Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
21
|
+
# string - Folder path. Note that Behavior paths cannot be updated once initially set. You will need to remove and re-create the behavior on the new path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
22
22
|
def path
|
23
23
|
@attributes[:path]
|
24
24
|
end
|
@@ -326,7 +326,7 @@ module Files
|
|
326
326
|
# cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
327
327
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
328
328
|
# path (required) - string - Path to operate on.
|
329
|
-
# filter - string - If specified, will filter folders/files list by
|
329
|
+
# filter - string - If specified, will filter folders/files list by name. Ignores text before last `/`. Wildcards of `*` and `?` are acceptable here.
|
330
330
|
# preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
331
331
|
# sort_by - object - Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
|
332
332
|
# search - string - If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
|
@@ -9,6 +9,51 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# date-time - When the snapshot expires.
|
13
|
+
def expires_at
|
14
|
+
@attributes[:expires_at]
|
15
|
+
end
|
16
|
+
|
17
|
+
def expires_at=(value)
|
18
|
+
@attributes[:expires_at] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
# date-time - When the snapshot was finalized.
|
22
|
+
def finalized_at
|
23
|
+
@attributes[:finalized_at]
|
24
|
+
end
|
25
|
+
|
26
|
+
def finalized_at=(value)
|
27
|
+
@attributes[:finalized_at] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
# string - A name for the snapshot.
|
31
|
+
def name
|
32
|
+
@attributes[:name]
|
33
|
+
end
|
34
|
+
|
35
|
+
def name=(value)
|
36
|
+
@attributes[:name] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
# int64 - The user that created this snapshot, if applicable.
|
40
|
+
def user_id
|
41
|
+
@attributes[:user_id]
|
42
|
+
end
|
43
|
+
|
44
|
+
def user_id=(value)
|
45
|
+
@attributes[:user_id] = value
|
46
|
+
end
|
47
|
+
|
48
|
+
# int64 - The bundle using this snapshot, if applicable.
|
49
|
+
def bundle_id
|
50
|
+
@attributes[:bundle_id]
|
51
|
+
end
|
52
|
+
|
53
|
+
def bundle_id=(value)
|
54
|
+
@attributes[:bundle_id] = value
|
55
|
+
end
|
56
|
+
|
12
57
|
# int64 - Snapshot ID.
|
13
58
|
def id
|
14
59
|
@attributes[:id]
|
@@ -58,8 +103,9 @@ module Files
|
|
58
103
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
59
104
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
60
105
|
|
61
|
-
|
62
|
-
|
106
|
+
List.new(Snapshot, params) do
|
107
|
+
Api.send_request("/snapshots", :get, params, options)
|
108
|
+
end
|
63
109
|
end
|
64
110
|
|
65
111
|
def self.all(params = {}, options = {})
|
@@ -74,8 +120,8 @@ module Files
|
|
74
120
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
75
121
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
76
122
|
|
77
|
-
response,
|
78
|
-
response.data
|
123
|
+
response, options = Api.send_request("/snapshots/#{params[:id]}", :get, params, options)
|
124
|
+
Snapshot.new(response.data, options)
|
79
125
|
end
|
80
126
|
|
81
127
|
def self.get(id, params = {}, options = {})
|
@@ -83,8 +129,8 @@ module Files
|
|
83
129
|
end
|
84
130
|
|
85
131
|
def self.create(params = {}, options = {})
|
86
|
-
response,
|
87
|
-
response.data
|
132
|
+
response, options = Api.send_request("/snapshots", :post, params, options)
|
133
|
+
Snapshot.new(response.data, options)
|
88
134
|
end
|
89
135
|
|
90
136
|
def self.update(id, params = {}, options = {})
|
@@ -93,8 +139,8 @@ module Files
|
|
93
139
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
94
140
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
95
141
|
|
96
|
-
response,
|
97
|
-
response.data
|
142
|
+
response, options = Api.send_request("/snapshots/#{params[:id]}", :patch, params, options)
|
143
|
+
Snapshot.new(response.data, options)
|
98
144
|
end
|
99
145
|
|
100
146
|
def self.delete(id, 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.
|
4
|
+
version: 1.0.343
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|