files.com 1.0.77 → 1.0.78
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/api_key.md +25 -25
- data/lib/files.com/models/api_key.rb +17 -17
- 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: 0a980877cfd1d13cd77d84319021702c5caa7bf8f74505756bf56bafce53aaad
|
4
|
+
data.tar.gz: 35bd639b7ccfa518f7f82ac6d78e602469b912d3410ac0eaea9a9eec7b412453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13e0d73c07f2664595c085a427ef1f6f29b86aec412d7229f07b4d2db91db5e750372c14a4e4e00f9dfd64e0d6478ca5903c2f45f859072bf08c40bed791be9a
|
7
|
+
data.tar.gz: a367d3a24b1d1c9edccd8e30dfffc65fd786edf9e5a799ec97456b1d503ec908bb44c8e87d23ef3119e213b101ca05dcaeba08146d0102d0087b8bf3307482a4
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.78
|
data/docs/api_key.md
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
* `key` (string): API Key actual key string
|
25
25
|
* `last_use_at` (date-time): API Key last used - note this value is only updated once per 3 hour period, so the 'actual' time of last use may be up to 3 hours later than this timestamp.
|
26
26
|
* `name` (string): Internal name for the API Key. For your use.
|
27
|
-
* `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations.
|
27
|
+
* `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
28
28
|
* `platform` (string): If this API key represents a Desktop app, what platform was it created on?
|
29
29
|
* `user_id` (int64): User ID for the owner of this API Key. May be blank for Site-wide API Keys.
|
30
30
|
|
@@ -78,18 +78,18 @@ Files::ApiKey.find(id)
|
|
78
78
|
```
|
79
79
|
Files::ApiKey.create(
|
80
80
|
user_id: 1,
|
81
|
-
name: "My Key",
|
82
|
-
|
83
|
-
|
81
|
+
name: "My Main API Key",
|
82
|
+
expires_at: "2000-01-01T01:00:00Z",
|
83
|
+
permission_set: "full"
|
84
84
|
)
|
85
85
|
```
|
86
86
|
|
87
87
|
### Parameters
|
88
88
|
|
89
89
|
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
90
|
-
* `name` (string): Internal name for
|
91
|
-
* `
|
92
|
-
* `
|
90
|
+
* `name` (string): Internal name for the API Key. For your use.
|
91
|
+
* `expires_at` (string): API Key expiration date
|
92
|
+
* `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
93
93
|
|
94
94
|
|
95
95
|
---
|
@@ -98,17 +98,17 @@ Files::ApiKey.create(
|
|
98
98
|
|
99
99
|
```
|
100
100
|
Files::ApiKey.update_current(
|
101
|
-
|
102
|
-
|
103
|
-
|
101
|
+
expires_at: "2000-01-01T01:00:00Z",
|
102
|
+
name: "My Main API Key",
|
103
|
+
permission_set: "full"
|
104
104
|
)
|
105
105
|
```
|
106
106
|
|
107
107
|
### Parameters
|
108
108
|
|
109
|
-
* `
|
110
|
-
* `
|
111
|
-
* `
|
109
|
+
* `expires_at` (string): API Key expiration date
|
110
|
+
* `name` (string): Internal name for the API Key. For your use.
|
111
|
+
* `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
112
112
|
|
113
113
|
|
114
114
|
---
|
@@ -117,18 +117,18 @@ Files::ApiKey.update_current(
|
|
117
117
|
|
118
118
|
```
|
119
119
|
Files::ApiKey.update(id,
|
120
|
-
name: "My Key",
|
121
|
-
|
122
|
-
|
120
|
+
name: "My Main API Key",
|
121
|
+
expires_at: "2000-01-01T01:00:00Z",
|
122
|
+
permission_set: "full"
|
123
123
|
)
|
124
124
|
```
|
125
125
|
|
126
126
|
### Parameters
|
127
127
|
|
128
128
|
* `id` (int64): Required - Api Key ID.
|
129
|
-
* `name` (string): Internal name for
|
130
|
-
* `
|
131
|
-
* `
|
129
|
+
* `name` (string): Internal name for the API Key. For your use.
|
130
|
+
* `expires_at` (string): API Key expiration date
|
131
|
+
* `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
132
132
|
|
133
133
|
|
134
134
|
---
|
@@ -161,18 +161,18 @@ Files::ApiKey.delete(id)
|
|
161
161
|
api_key = Files::ApiKey.list_for(path).first
|
162
162
|
|
163
163
|
api_key.update(
|
164
|
-
name: "My Key",
|
165
|
-
|
166
|
-
|
164
|
+
name: "My Main API Key",
|
165
|
+
expires_at: "2000-01-01T01:00:00Z",
|
166
|
+
permission_set: "full"
|
167
167
|
)
|
168
168
|
```
|
169
169
|
|
170
170
|
### Parameters
|
171
171
|
|
172
172
|
* `id` (int64): Required - Api Key ID.
|
173
|
-
* `name` (string): Internal name for
|
174
|
-
* `
|
175
|
-
* `
|
173
|
+
* `name` (string): Internal name for the API Key. For your use.
|
174
|
+
* `expires_at` (string): API Key expiration date
|
175
|
+
* `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
176
176
|
|
177
177
|
|
178
178
|
---
|
@@ -68,7 +68,7 @@ module Files
|
|
68
68
|
@attributes[:name] = value
|
69
69
|
end
|
70
70
|
|
71
|
-
# string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations.
|
71
|
+
# string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
72
72
|
def permission_set
|
73
73
|
@attributes[:permission_set]
|
74
74
|
end
|
@@ -96,17 +96,17 @@ module Files
|
|
96
96
|
end
|
97
97
|
|
98
98
|
# Parameters:
|
99
|
-
# name - string - Internal name for
|
100
|
-
#
|
101
|
-
#
|
99
|
+
# name - string - Internal name for the API Key. For your use.
|
100
|
+
# expires_at - string - API Key expiration date
|
101
|
+
# permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
102
102
|
def update(params = {})
|
103
103
|
params ||= {}
|
104
104
|
params[:id] = @attributes[:id]
|
105
105
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
106
106
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
107
107
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
108
|
-
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params.dig(:permission_set) and !params.dig(:permission_set).is_a?(String)
|
109
108
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
|
109
|
+
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params.dig(:permission_set) and !params.dig(:permission_set).is_a?(String)
|
110
110
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
111
111
|
|
112
112
|
Api.send_request("/api_keys/#{@attributes[:id]}", :patch, params, @options)
|
@@ -179,43 +179,43 @@ module Files
|
|
179
179
|
|
180
180
|
# Parameters:
|
181
181
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
182
|
-
# name - string - Internal name for
|
183
|
-
#
|
184
|
-
#
|
182
|
+
# name - string - Internal name for the API Key. For your use.
|
183
|
+
# expires_at - string - API Key expiration date
|
184
|
+
# permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
185
185
|
def self.create(params = {}, options = {})
|
186
186
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
187
187
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
188
|
-
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params.dig(:permission_set) and !params.dig(:permission_set).is_a?(String)
|
189
188
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
|
189
|
+
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params.dig(:permission_set) and !params.dig(:permission_set).is_a?(String)
|
190
190
|
|
191
191
|
response, options = Api.send_request("/api_keys", :post, params, options)
|
192
192
|
ApiKey.new(response.data, options)
|
193
193
|
end
|
194
194
|
|
195
195
|
# Parameters:
|
196
|
-
#
|
197
|
-
#
|
198
|
-
#
|
196
|
+
# expires_at - string - API Key expiration date
|
197
|
+
# name - string - Internal name for the API Key. For your use.
|
198
|
+
# permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
199
199
|
def self.update_current(params = {}, options = {})
|
200
|
+
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
|
200
201
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
201
202
|
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params.dig(:permission_set) and !params.dig(:permission_set).is_a?(String)
|
202
|
-
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
|
203
203
|
|
204
204
|
response, options = Api.send_request("/api_key", :patch, params, options)
|
205
205
|
ApiKey.new(response.data, options)
|
206
206
|
end
|
207
207
|
|
208
208
|
# Parameters:
|
209
|
-
# name - string - Internal name for
|
210
|
-
#
|
211
|
-
#
|
209
|
+
# name - string - Internal name for the API Key. For your use.
|
210
|
+
# expires_at - string - API Key expiration date
|
211
|
+
# permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
212
212
|
def self.update(id, params = {}, options = {})
|
213
213
|
params ||= {}
|
214
214
|
params[:id] = id
|
215
215
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
216
216
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
217
|
-
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params.dig(:permission_set) and !params.dig(:permission_set).is_a?(String)
|
218
217
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
|
218
|
+
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params.dig(:permission_set) and !params.dig(:permission_set).is_a?(String)
|
219
219
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
220
220
|
|
221
221
|
response, options = Api.send_request("/api_keys/#{params[:id]}", :patch, 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.78
|
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-
|
11
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|