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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42facb096cac23769533241c08e783056751f132a0a1d5021da0e2f35f8d7d36
4
- data.tar.gz: 3d160c69bcf1af9966be73e4f62706045af6fa903f948623b63354ddf3a73881
3
+ metadata.gz: c71156389e0b6234b60ed41cfb6a47c63d40733c7510e8ab5fb6aaf9b0994c24
4
+ data.tar.gz: 10b5604e99412b84b1011ceea259c14a111c4a5a6196430a4fce201ccbfaa1a8
5
5
  SHA512:
6
- metadata.gz: 8092f446d0281ad11b4d6541d162dd06dcd9a7be8fb1ffcd7635c25b2617394cf3bad31c89471bbf4f9865369238857544245c3fbf517ce9b2a523bbef436dab
7
- data.tar.gz: 9b89571030ea82226be5cf6e719c139a5cf9eaac1ec693b43b1c876ef1632bb21410fe80bc0fa8cbcdff20e135c93398c9a1b290905921f4992f2a7d26c5ad69
6
+ metadata.gz: 8a2746cc39fcf8518b8d3e5cdbda82ded80e1f0ac5bf130728c49e708bc4ca856cc2f39826f54c590f4702dd2c13ea991a5d00c08d24156bf673d180565ed1b2
7
+ data.tar.gz: d5851ae9f52779f23fd9e04a45ab22e8e890d05a145455cf450395ef8b1aa266a1f10466b6f226d3349e62d84a59aab31d1c50bd44656baf803f4c7a69545244
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.341
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 this string. Wildcards of `*` and `?` are acceptable here.
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 this string. Wildcards of `*` and `?` are acceptable here.
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
- response, _options = Api.send_request("/snapshots", :get, params, options)
62
- response.data
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, _options = Api.send_request("/snapshots/#{params[:id]}", :get, params, options)
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, _options = Api.send_request("/snapshots", :post, params, options)
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, _options = Api.send_request("/snapshots/#{params[:id]}", :patch, params, options)
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.341
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-24 00:00:00.000000000 Z
11
+ date: 2023-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable