files.com 1.0.24 → 1.0.25
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/session.md +2 -0
- data/lib/files.com/models/session.rb +11 -0
- 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: 93bf3a929cdb01f8e8e201708eadd8232aec1f41329ac9291bd819a68ea42218
|
4
|
+
data.tar.gz: 7a174d1268bf95fd850f531909859d19bb4343f2261a6b92b97bd5d52e3faf0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a4fbea1f8279fd6281a5913564050f0c14fee5b385483c6137e48b27e8be9dc2b76ae5dc1f06ede227a97ed034f5099d957a9c30e11ed20dd18b40032cb84cc
|
7
|
+
data.tar.gz: 2cf06084b484dcd5d4983a3de00fee9de57875a2dd83a6f609a50223e53fc09282b60545f1461f6c7bad1e6219815023e5343036b91822f9f8ee09fc5858a9cb
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.25
|
data/docs/session.md
CHANGED
@@ -46,6 +46,7 @@
|
|
46
46
|
* `username` (string): Username to sign in as
|
47
47
|
* `password` (string): Password for sign in
|
48
48
|
* `otp` (string): If this user has a 2FA device, provide its OTP or code here.
|
49
|
+
* `partial_session_id` (string): Identifier for a partially-completed login
|
49
50
|
|
50
51
|
|
51
52
|
---
|
@@ -65,6 +66,7 @@ Files::Session.create(
|
|
65
66
|
* `username` (string): Username to sign in as
|
66
67
|
* `password` (string): Password for sign in
|
67
68
|
* `otp` (string): If this user has a 2FA device, provide its OTP or code here.
|
69
|
+
* `partial_session_id` (string): Identifier for a partially-completed login
|
68
70
|
|
69
71
|
|
70
72
|
---
|
@@ -201,6 +201,15 @@ module Files
|
|
201
201
|
@attributes[:otp] = value
|
202
202
|
end
|
203
203
|
|
204
|
+
# string - Identifier for a partially-completed login
|
205
|
+
def partial_session_id
|
206
|
+
@attributes[:partial_session_id]
|
207
|
+
end
|
208
|
+
|
209
|
+
def partial_session_id=(value)
|
210
|
+
@attributes[:partial_session_id] = value
|
211
|
+
end
|
212
|
+
|
204
213
|
def save
|
205
214
|
if @attributes[:id]
|
206
215
|
raise NotImplementedError.new("The Session object doesn't support updates.")
|
@@ -214,10 +223,12 @@ module Files
|
|
214
223
|
# username - string - Username to sign in as
|
215
224
|
# password - string - Password for sign in
|
216
225
|
# otp - string - If this user has a 2FA device, provide its OTP or code here.
|
226
|
+
# partial_session_id - string - Identifier for a partially-completed login
|
217
227
|
def self.create(params = {}, options = {})
|
218
228
|
raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String)
|
219
229
|
raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
|
220
230
|
raise InvalidParameterError.new("Bad parameter: otp must be an String") if params.dig(:otp) and !params.dig(:otp).is_a?(String)
|
231
|
+
raise InvalidParameterError.new("Bad parameter: partial_session_id must be an String") if params.dig(:partial_session_id) and !params.dig(:partial_session_id).is_a?(String)
|
221
232
|
|
222
233
|
response, options = Api.send_request("/sessions", :post, params, options)
|
223
234
|
Session.new(response.data, 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.25
|
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-03-
|
11
|
+
date: 2020-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|