files.com 1.1.213 → 1.1.215

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: 0aa1b1dabdffac54052c89ac87f15ee9ac650bdc965d70828f4e1bc4e7751ec3
4
- data.tar.gz: 7ddc9231cfbb86f353f343e89214aa36618fade837ca97f615d555b6d502a95a
3
+ metadata.gz: bbd484d37bc76b30ccf6b83aecbd6dc3ea290bc48e7ffc800c88eaf01789dfad
4
+ data.tar.gz: 55474dd7880a576b0841db13709743c563811943b41c3c0adbe1f81517e5abf3
5
5
  SHA512:
6
- metadata.gz: d80ba5f257c67eddd460a67a60f5f857e21bbddd2f7afbb73e96786d5e2a1358b78ff8971e5e73f4227fe9fe2f1c921135e5f0d9d670a0101a1c2a999ce81fc6
7
- data.tar.gz: 3f373231f8e777bc9eec36c09301732b5d1b30a346c52bbce762429ebbef2b22459352450880308b3ed6f4c49e688d7d86ab366e93cc7ecb5c5ca4734a29d436
6
+ metadata.gz: 216284c45420dab170114d42625eb036252146d1377130405c8d64f3f818ec0150becb73c61b51d6fba20a79ad0575207451f435b13be81d4eeb179038a8d524
7
+ data.tar.gz: bef4589ef41d24231b12d7c5e320aea30e9cb1ace59120226ed51ed3f2f57fca80856023150ff656a6615f58a6f17d472920286b8e070fb273f414cf71d47214
data/README.md CHANGED
@@ -557,6 +557,28 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
557
557
  |`TrialLockedError`| `SiteConfigurationError` |
558
558
  |`UserRequestsEnabledRequiredError`| `SiteConfigurationError` |
559
559
 
560
+ ## {frontmatter.title}
561
+
562
+ Certain API operations return lists of objects. When the number of objects in the list is large,
563
+ the API will paginate the results.
564
+
565
+ The Files.com Ruby SDK automatically paginates through lists of objects by default.
566
+
567
+ ```ruby title="Example Request" hasDataFormatSelector
568
+ begin
569
+ files = Files::Folder.list_for(path,
570
+ search: "some-partial-filename"
571
+ )
572
+ files.auto_paging_each do |file|
573
+ # Operate on file
574
+ end
575
+ rescue Files::NotAuthenticatedError => e
576
+ puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
577
+ rescue Files::Error => e
578
+ puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
579
+ end
580
+ ```
581
+
560
582
  ## Case Sensitivity
561
583
 
562
584
  The Files.com API compares files and paths in a case-insensitive manner.
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.213
1
+ 1.1.215
data/docs/permission.md CHANGED
@@ -11,7 +11,8 @@
11
11
  "group_id": 1,
12
12
  "group_name": "example",
13
13
  "permission": "full",
14
- "recursive": true
14
+ "recursive": true,
15
+ "site_id": 1
15
16
  }
16
17
  ```
17
18
 
@@ -23,6 +24,7 @@
23
24
  * `group_name` (string): Group name (if applicable)
24
25
  * `permission` (string): Permission type. See the table referenced in the documentation for an explanation of each permission.
25
26
  * `recursive` (boolean): Recursive: does this permission apply to subfolders?
27
+ * `site_id` (int64): Site ID
26
28
 
27
29
 
28
30
  ---
@@ -42,7 +44,7 @@ Files::Permission.list(
42
44
 
43
45
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
44
46
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
45
- * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `group_id`, `path` or `user_id`.
47
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path` or `user_id`.
46
48
  * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]` or `[ user_id, group_id ]`.
47
49
  * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
48
50
  * `path` (string): Permission path. If provided, will scope all permissions(including upward) to this path.
@@ -63,7 +65,8 @@ Files::Permission.create(
63
65
  recursive: false,
64
66
  user_id: 1,
65
67
  username: "user",
66
- group_name: "example"
68
+ group_name: "example",
69
+ site_id: 1
67
70
  )
68
71
  ```
69
72
 
@@ -76,6 +79,7 @@ Files::Permission.create(
76
79
  * `user_id` (int64): User ID. Provide `username` or `user_id`
77
80
  * `username` (string): User username. Provide `username` or `user_id`
78
81
  * `group_name` (string): Group name. Provide `group_name` or `group_id`
82
+ * `site_id` (int64): Site ID. If not provided, will default to current site. Used when creating a permission for a child site.
79
83
 
80
84
 
81
85
  ---
@@ -81,6 +81,15 @@ module Files
81
81
  @attributes[:recursive] = value
82
82
  end
83
83
 
84
+ # int64 - Site ID
85
+ def site_id
86
+ @attributes[:site_id]
87
+ end
88
+
89
+ def site_id=(value)
90
+ @attributes[:site_id] = value
91
+ end
92
+
84
93
  def delete(params = {})
85
94
  params ||= {}
86
95
  params[:id] = @attributes[:id]
@@ -110,7 +119,7 @@ module Files
110
119
  # Parameters:
111
120
  # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
112
121
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
113
- # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `group_id`, `path` or `user_id`.
122
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path` or `user_id`.
114
123
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]` or `[ user_id, group_id ]`.
115
124
  # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
116
125
  # path - string - Permission path. If provided, will scope all permissions(including upward) to this path.
@@ -144,6 +153,7 @@ module Files
144
153
  # user_id - int64 - User ID. Provide `username` or `user_id`
145
154
  # username - string - User username. Provide `username` or `user_id`
146
155
  # group_name - string - Group name. Provide `group_name` or `group_id`
156
+ # site_id - int64 - Site ID. If not provided, will default to current site. Used when creating a permission for a child site.
147
157
  def self.create(params = {}, options = {})
148
158
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
149
159
  raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params[:group_id] and !params[:group_id].is_a?(Integer)
@@ -151,6 +161,7 @@ module Files
151
161
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
152
162
  raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String)
153
163
  raise InvalidParameterError.new("Bad parameter: group_name must be an String") if params[:group_name] and !params[:group_name].is_a?(String)
164
+ raise InvalidParameterError.new("Bad parameter: site_id must be an Integer") if params[:site_id] and !params[:site_id].is_a?(Integer)
154
165
  raise MissingParameterError.new("Parameter missing: path") unless params[:path]
155
166
 
156
167
  response, options = Api.send_request("/permissions", :post, params, options)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.213"
4
+ VERSION = "1.1.215"
5
5
  end
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.213
4
+ version: 1.1.215
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-15 00:00:00.000000000 Z
11
+ date: 2025-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable