files.com 1.1.10 → 1.1.11
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 +9 -9
- data/lib/files.com/models/api_key.rb +7 -6
- data/lib/files.com/version.rb +1 -1
- 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: 392495ae69d5290076e2b4649f74210d6903e07d1ccad94c4ba611298db371c1
|
4
|
+
data.tar.gz: 46f063cd2a0fe71f996d35cad85414b820a68dedc49a708a303e85953f2dad44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f10089dbc2b2370e0cb550085d59329dc822ba9a0f48ec2515b324ab882a364c275e134210507456f8566e7174622b2268e4bf162a4e0a8f02f8c4c4efca9e7
|
7
|
+
data.tar.gz: 86093c1451e65a8f9d31ecefd33d2055dbc859fe3e23ebabbb8bbf9e4bb8749f147f688bfbfc973b4b446ea9e5d347c7166203792fdc5cbc71e17b7b60923495
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.11
|
data/docs/api_key.md
CHANGED
@@ -86,20 +86,20 @@ Files::ApiKey.find(id)
|
|
86
86
|
```
|
87
87
|
Files::ApiKey.create(
|
88
88
|
user_id: 1,
|
89
|
-
name: "My Main API Key",
|
90
89
|
description: "example",
|
91
90
|
expires_at: "2000-01-01T01:00:00Z",
|
92
|
-
permission_set: "full"
|
91
|
+
permission_set: "full",
|
92
|
+
name: "My Main API Key"
|
93
93
|
)
|
94
94
|
```
|
95
95
|
|
96
96
|
### Parameters
|
97
97
|
|
98
98
|
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
99
|
-
* `name` (string): Internal name for the API Key. For your use.
|
100
99
|
* `description` (string): User-supplied description of API key.
|
101
100
|
* `expires_at` (string): API Key expiration date
|
102
101
|
* `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. 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
|
+
* `name` (string): Required - Internal name for the API Key. For your use.
|
103
103
|
|
104
104
|
|
105
105
|
---
|
@@ -127,20 +127,20 @@ Files::ApiKey.update_current(
|
|
127
127
|
|
128
128
|
```
|
129
129
|
Files::ApiKey.update(id,
|
130
|
-
name: "My Main API Key",
|
131
130
|
description: "example",
|
132
131
|
expires_at: "2000-01-01T01:00:00Z",
|
133
|
-
permission_set: "full"
|
132
|
+
permission_set: "full",
|
133
|
+
name: "My Main API Key"
|
134
134
|
)
|
135
135
|
```
|
136
136
|
|
137
137
|
### Parameters
|
138
138
|
|
139
139
|
* `id` (int64): Required - Api Key ID.
|
140
|
-
* `name` (string): Internal name for the API Key. For your use.
|
141
140
|
* `description` (string): User-supplied description of API key.
|
142
141
|
* `expires_at` (string): API Key expiration date
|
143
142
|
* `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. 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.
|
143
|
+
* `name` (string): Internal name for the API Key. For your use.
|
144
144
|
|
145
145
|
|
146
146
|
---
|
@@ -173,20 +173,20 @@ Files::ApiKey.delete(id)
|
|
173
173
|
api_key = Files::ApiKey.list.first
|
174
174
|
|
175
175
|
api_key.update(
|
176
|
-
name: "My Main API Key",
|
177
176
|
description: "example",
|
178
177
|
expires_at: "2000-01-01T01:00:00Z",
|
179
|
-
permission_set: "full"
|
178
|
+
permission_set: "full",
|
179
|
+
name: "My Main API Key"
|
180
180
|
)
|
181
181
|
```
|
182
182
|
|
183
183
|
### Parameters
|
184
184
|
|
185
185
|
* `id` (int64): Required - Api Key ID.
|
186
|
-
* `name` (string): Internal name for the API Key. For your use.
|
187
186
|
* `description` (string): User-supplied description of API key.
|
188
187
|
* `expires_at` (string): API Key expiration date
|
189
188
|
* `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. 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.
|
189
|
+
* `name` (string): Internal name for the API Key. For your use.
|
190
190
|
|
191
191
|
|
192
192
|
---
|
@@ -114,19 +114,19 @@ module Files
|
|
114
114
|
end
|
115
115
|
|
116
116
|
# Parameters:
|
117
|
-
# name - string - Internal name for the API Key. For your use.
|
118
117
|
# description - string - User-supplied description of API key.
|
119
118
|
# expires_at - string - API Key expiration date
|
120
119
|
# permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. 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.
|
120
|
+
# name - string - Internal name for the API Key. For your use.
|
121
121
|
def update(params = {})
|
122
122
|
params ||= {}
|
123
123
|
params[:id] = @attributes[:id]
|
124
124
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
125
125
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
126
|
-
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
127
126
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
128
127
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
|
129
128
|
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
|
129
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
130
130
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
131
131
|
|
132
132
|
Api.send_request("/api_keys/#{@attributes[:id]}", :patch, params, @options)
|
@@ -211,16 +211,17 @@ module Files
|
|
211
211
|
|
212
212
|
# Parameters:
|
213
213
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
214
|
-
# name - string - Internal name for the API Key. For your use.
|
215
214
|
# description - string - User-supplied description of API key.
|
216
215
|
# expires_at - string - API Key expiration date
|
217
216
|
# permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. 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.
|
217
|
+
# name (required) - string - Internal name for the API Key. For your use.
|
218
218
|
def self.create(params = {}, options = {})
|
219
219
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
220
|
-
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
221
220
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
222
221
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
|
223
222
|
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
|
223
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
224
|
+
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
224
225
|
|
225
226
|
response, options = Api.send_request("/api_keys", :post, params, options)
|
226
227
|
ApiKey.new(response.data, options)
|
@@ -240,18 +241,18 @@ module Files
|
|
240
241
|
end
|
241
242
|
|
242
243
|
# Parameters:
|
243
|
-
# name - string - Internal name for the API Key. For your use.
|
244
244
|
# description - string - User-supplied description of API key.
|
245
245
|
# expires_at - string - API Key expiration date
|
246
246
|
# permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. 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.
|
247
|
+
# name - string - Internal name for the API Key. For your use.
|
247
248
|
def self.update(id, params = {}, options = {})
|
248
249
|
params ||= {}
|
249
250
|
params[:id] = id
|
250
251
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
251
|
-
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
252
252
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
253
253
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
|
254
254
|
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
|
255
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
255
256
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
256
257
|
|
257
258
|
response, options = Api.send_request("/api_keys/#{params[:id]}", :patch, params, options)
|
data/lib/files.com/version.rb
CHANGED
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.
|
4
|
+
version: 1.1.11
|
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-12-
|
11
|
+
date: 2023-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|