files.com 1.0.86 → 1.0.91
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/Gemfile +2 -2
- data/Gemfile.lock +3 -3
- data/SECURITY.md +24 -0
- data/_VERSION +1 -1
- data/docs/api_key.md +13 -1
- data/docs/app.md +12 -0
- data/docs/automation.md +9 -1
- data/docs/behavior.md +30 -14
- data/docs/bundle.md +8 -0
- data/docs/file.md +0 -4
- data/docs/group.md +8 -0
- data/docs/history.md +16 -0
- data/docs/ip_address.md +18 -0
- data/docs/message.md +11 -11
- data/docs/notification.md +10 -2
- data/docs/permission.md +11 -3
- data/docs/public_ip_address.md +13 -0
- data/docs/request.md +6 -25
- data/docs/session.md +2 -2
- data/docs/style.md +1 -1
- data/docs/usage_daily_snapshot.md +8 -0
- data/docs/user.md +8 -2
- data/lib/files.com.rb +1 -0
- data/lib/files.com/models/api_key.rb +30 -4
- data/lib/files.com/models/app.rb +28 -3
- data/lib/files.com/models/automation.rb +19 -4
- data/lib/files.com/models/behavior.rb +53 -23
- data/lib/files.com/models/bundle.rb +19 -4
- data/lib/files.com/models/file.rb +7 -11
- data/lib/files.com/models/file_action.rb +6 -6
- data/lib/files.com/models/file_comment.rb +1 -1
- data/lib/files.com/models/folder.rb +2 -2
- data/lib/files.com/models/group.rb +18 -3
- data/lib/files.com/models/history.rb +43 -16
- data/lib/files.com/models/ip_address.rb +15 -0
- data/lib/files.com/models/lock.rb +4 -4
- data/lib/files.com/models/message.rb +5 -5
- data/lib/files.com/models/notification.rb +20 -5
- data/lib/files.com/models/permission.rb +21 -6
- data/lib/files.com/models/public_ip_address.rb +22 -0
- data/lib/files.com/models/request.rb +15 -28
- data/lib/files.com/models/session.rb +1 -1
- data/lib/files.com/models/style.rb +8 -8
- data/lib/files.com/models/usage_daily_snapshot.rb +18 -3
- data/lib/files.com/models/user.rb +18 -5
- metadata +5 -2
@@ -94,9 +94,17 @@ module Files
|
|
94
94
|
# page - int64 - Current page number.
|
95
95
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
96
96
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
97
|
+
# 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.
|
98
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `deleted_at`, `group_id`, `path`, `user_id` or `permission`.
|
99
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
100
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
101
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
102
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
103
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
104
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
105
|
+
# path - string - DEPRECATED: Permission path. If provided, will scope permissions to this path. Use `filter[path]` instead.
|
106
|
+
# group_id - string - DEPRECATED: Group ID. If provided, will scope permissions to this group. Use `filter[group_id]` instead.`
|
107
|
+
# user_id - string - DEPRECATED: User ID. If provided, will scope permissions to this user. Use `filter[user_id]` instead.`
|
100
108
|
# include_groups - boolean - If searching by user or group, also include user's permissions that are inherited from its groups?
|
101
109
|
def self.list(path, params = {}, options = {})
|
102
110
|
params ||= {}
|
@@ -104,13 +112,20 @@ module Files
|
|
104
112
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
105
113
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
106
114
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
115
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
116
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
117
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
118
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
119
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
120
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
121
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
122
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
107
123
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
108
124
|
raise InvalidParameterError.new("Bad parameter: group_id must be an String") if params.dig(:group_id) and !params.dig(:group_id).is_a?(String)
|
109
125
|
raise InvalidParameterError.new("Bad parameter: user_id must be an String") if params.dig(:user_id) and !params.dig(:user_id).is_a?(String)
|
110
126
|
|
111
|
-
|
112
|
-
|
113
|
-
Permission.new(entity_data, options)
|
127
|
+
List.new(Permission, params) do
|
128
|
+
Api.send_request("/permissions", :get, params, options)
|
114
129
|
end
|
115
130
|
end
|
116
131
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class PublicIpAddress
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# string - The public IP address.
|
13
|
+
def ip_address
|
14
|
+
@attributes[:ip_address]
|
15
|
+
end
|
16
|
+
|
17
|
+
# string - The name of the frontend server.
|
18
|
+
def server_name
|
19
|
+
@attributes[:server_name]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -81,25 +81,6 @@ module Files
|
|
81
81
|
@attributes[:group_ids] = value
|
82
82
|
end
|
83
83
|
|
84
|
-
# List Requests
|
85
|
-
#
|
86
|
-
# Parameters:
|
87
|
-
# page - int64 - Current page number.
|
88
|
-
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
89
|
-
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
90
|
-
# mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
91
|
-
def folders(params = {})
|
92
|
-
params ||= {}
|
93
|
-
params[:path] = @attributes[:path]
|
94
|
-
raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
|
95
|
-
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
96
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
97
|
-
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
98
|
-
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
99
|
-
|
100
|
-
Api.send_request("/requests/folders/#{Addressable::URI.encode_component(params[:path])}", :get, params, @options)
|
101
|
-
end
|
102
|
-
|
103
84
|
def save
|
104
85
|
if @attributes[:path]
|
105
86
|
raise NotImplementedError.new("The Request object doesn't support updates.")
|
@@ -113,6 +94,8 @@ module Files
|
|
113
94
|
# page - int64 - Current page number.
|
114
95
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
115
96
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
97
|
+
# 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.
|
98
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `folder_id` or `destination`.
|
116
99
|
# mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
117
100
|
# path - string - Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
|
118
101
|
def self.list(path, params = {}, options = {})
|
@@ -121,11 +104,12 @@ module Files
|
|
121
104
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
122
105
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
123
106
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
107
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
108
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
124
109
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
125
110
|
|
126
|
-
|
127
|
-
|
128
|
-
Request.new(entity_data, options)
|
111
|
+
List.new(Request, params) do
|
112
|
+
Api.send_request("/requests", :get, params, options)
|
129
113
|
end
|
130
114
|
end
|
131
115
|
|
@@ -133,24 +117,27 @@ module Files
|
|
133
117
|
list(path, params, options)
|
134
118
|
end
|
135
119
|
|
136
|
-
# List Requests
|
137
|
-
#
|
138
120
|
# Parameters:
|
139
121
|
# page - int64 - Current page number.
|
140
122
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
141
123
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
124
|
+
# 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.
|
125
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `folder_id` or `destination`.
|
142
126
|
# mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
143
|
-
|
127
|
+
# path (required) - string - Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
|
128
|
+
def self.find_folder(path, params = {}, options = {})
|
144
129
|
params ||= {}
|
145
130
|
params[:path] = path
|
146
131
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
147
132
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
148
133
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
134
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
135
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
149
136
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
137
|
+
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
150
138
|
|
151
|
-
|
152
|
-
|
153
|
-
Request.new(entity_data, options)
|
139
|
+
List.new(Request, params) do
|
140
|
+
Api.send_request("/requests/folders/#{params[:path]}", :get, params, options)
|
154
141
|
end
|
155
142
|
end
|
156
143
|
|
@@ -64,7 +64,7 @@ module Files
|
|
64
64
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
65
65
|
raise MissingParameterError.new("Parameter missing: file") unless params.dig(:file)
|
66
66
|
|
67
|
-
Api.send_request("/styles/#{
|
67
|
+
Api.send_request("/styles/#{@attributes[:path]}", :patch, params, @options)
|
68
68
|
end
|
69
69
|
|
70
70
|
def delete(params = {})
|
@@ -74,7 +74,7 @@ module Files
|
|
74
74
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
75
75
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
76
76
|
|
77
|
-
Api.send_request("/styles/#{
|
77
|
+
Api.send_request("/styles/#{@attributes[:path]}", :delete, params, @options)
|
78
78
|
end
|
79
79
|
|
80
80
|
def destroy(params = {})
|
@@ -87,18 +87,18 @@ module Files
|
|
87
87
|
|
88
88
|
# Parameters:
|
89
89
|
# path (required) - string - Style path.
|
90
|
-
def self.
|
90
|
+
def self.find(path, params = {}, options = {})
|
91
91
|
params ||= {}
|
92
92
|
params[:path] = path
|
93
93
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
94
94
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
95
95
|
|
96
|
-
response, options = Api.send_request("/styles/#{
|
96
|
+
response, options = Api.send_request("/styles/#{params[:path]}", :get, params, options)
|
97
97
|
Style.new(response.data, options)
|
98
98
|
end
|
99
99
|
|
100
|
-
def self.
|
101
|
-
|
100
|
+
def self.get(path, params = {}, options = {})
|
101
|
+
find(path, params, options)
|
102
102
|
end
|
103
103
|
|
104
104
|
# Parameters:
|
@@ -110,7 +110,7 @@ module Files
|
|
110
110
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
111
111
|
raise MissingParameterError.new("Parameter missing: file") unless params.dig(:file)
|
112
112
|
|
113
|
-
response, options = Api.send_request("/styles/#{
|
113
|
+
response, options = Api.send_request("/styles/#{params[:path]}", :patch, params, options)
|
114
114
|
Style.new(response.data, options)
|
115
115
|
end
|
116
116
|
|
@@ -120,7 +120,7 @@ module Files
|
|
120
120
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
121
121
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
122
122
|
|
123
|
-
response, _options = Api.send_request("/styles/#{
|
123
|
+
response, _options = Api.send_request("/styles/#{params[:path]}", :delete, params, options)
|
124
124
|
response.data
|
125
125
|
end
|
126
126
|
|
@@ -33,14 +33,29 @@ module Files
|
|
33
33
|
# page - int64 - Current page number.
|
34
34
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
35
35
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
36
|
+
# 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.
|
37
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `date` or `usage_snapshot_id`.
|
38
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
39
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
40
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
41
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
42
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
43
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
36
44
|
def self.list(params = {}, options = {})
|
37
45
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
38
46
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
39
47
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
48
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
49
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
50
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
51
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
52
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
53
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
54
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
55
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
40
56
|
|
41
|
-
|
42
|
-
|
43
|
-
UsageDailySnapshot.new(entity_data, options)
|
57
|
+
List.new(UsageDailySnapshot, params) do
|
58
|
+
Api.send_request("/usage_daily_snapshots", :get, params, options)
|
44
59
|
end
|
45
60
|
end
|
46
61
|
|
@@ -625,6 +625,14 @@ module Files
|
|
625
625
|
# page - int64 - Current page number.
|
626
626
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
627
627
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
628
|
+
# 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.
|
629
|
+
# sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `active`, `master_admin`, `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `username`, `notes`, `site_admin`, `receive_admin_alerts`, `allowed_ips`, `password_validity_days`, `ssl_required` or `not_site_admin`.
|
630
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
631
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
632
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
633
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
634
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
635
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
628
636
|
# ids - string - comma-separated list of User IDs
|
629
637
|
# q[username] - string - List users matching username.
|
630
638
|
# q[email] - string - List users matching email.
|
@@ -634,18 +642,23 @@ module Files
|
|
634
642
|
# q[password_validity_days] - string - If set, list only users with overridden password validity days setting.
|
635
643
|
# q[ssl_required] - string - If set, list only users with overridden SSL required setting.
|
636
644
|
# search - string - Searches for partial matches of name, username, or email.
|
637
|
-
# sort_by[last_login_at] - string - If set, sort users by 'last_login_at' in either 'asc' or 'desc' direction
|
638
|
-
# sort_by[authenticate_until] - string - If set, sort users by 'authenticate_until' in either 'asc' or 'desc' direction
|
639
645
|
def self.list(params = {}, options = {})
|
640
646
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
641
647
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
642
648
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
649
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
650
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
651
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
652
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
653
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
654
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
655
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
656
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
643
657
|
raise InvalidParameterError.new("Bad parameter: ids must be an String") if params.dig(:ids) and !params.dig(:ids).is_a?(String)
|
644
658
|
raise InvalidParameterError.new("Bad parameter: search must be an String") if params.dig(:search) and !params.dig(:search).is_a?(String)
|
645
659
|
|
646
|
-
|
647
|
-
|
648
|
-
User.new(entity_data, options)
|
660
|
+
List.new(User, params) do
|
661
|
+
Api.send_request("/users", :get, params, options)
|
649
662
|
end
|
650
663
|
end
|
651
664
|
|
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.91
|
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-07-
|
11
|
+
date: 2020-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- LICENSE
|
82
82
|
- README.md
|
83
83
|
- Rakefile
|
84
|
+
- SECURITY.md
|
84
85
|
- _VERSION
|
85
86
|
- bin/files
|
86
87
|
- bin/files-console
|
@@ -123,6 +124,7 @@ files:
|
|
123
124
|
- docs/permission.md
|
124
125
|
- docs/preview.md
|
125
126
|
- docs/project.md
|
127
|
+
- docs/public_ip_address.md
|
126
128
|
- docs/public_key.md
|
127
129
|
- docs/remote_server.md
|
128
130
|
- docs/request.md
|
@@ -182,6 +184,7 @@ files:
|
|
182
184
|
- lib/files.com/models/permission.rb
|
183
185
|
- lib/files.com/models/preview.rb
|
184
186
|
- lib/files.com/models/project.rb
|
187
|
+
- lib/files.com/models/public_ip_address.rb
|
185
188
|
- lib/files.com/models/public_key.rb
|
186
189
|
- lib/files.com/models/remote_server.rb
|
187
190
|
- lib/files.com/models/request.rb
|