learnworlds 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/learn_worlds/client.rb +1 -1
- data/lib/learn_worlds/resources/authentication_resource.rb +2 -1
- data/lib/learn_worlds/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: 326b7da781aae52fef008a7b6c28e38ac7df6bd5f7d3e7aaa63a2f49736e3422
|
4
|
+
data.tar.gz: 0d9967da29d5c941b8470d3d0baf4e2c3d6ed287314cd0faaa02afcd6113b795
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4136813e98e0ab31e54a4abe278f66d6cc63c0eb887913be7cd2948589d4ae740bcc9091d149e49ee945f6655323de3a4560e1f45c1e326a342d7a3d43dc932
|
7
|
+
data.tar.gz: af249f49f09b4c2d7d1dc476f9bc0dee42c55a795e6cac0ff0a5f8833106bdeb03c8f81ae5c15cdfe5c8ae8a24bd4d0b52ee87d28fdbdf5d6568796a7e0262f4
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/learn_worlds/client.rb
CHANGED
@@ -6,7 +6,7 @@ require_relative "object"
|
|
6
6
|
module LearnWorlds
|
7
7
|
class Client
|
8
8
|
attr_reader :base_url, :client_id, :client_secret
|
9
|
-
attr_accessor :access_token
|
9
|
+
attr_accessor :access_token, :expires_in
|
10
10
|
|
11
11
|
def initialize(client_id: nil, client_secret: nil, base_url: nil, access_token: nil)
|
12
12
|
@client_id = client_id || ENV.fetch('"LEARN_WORLDS_CLIENT_ID"')
|
@@ -15,7 +15,7 @@ module LearnWorlds
|
|
15
15
|
end
|
16
16
|
|
17
17
|
# custom method to store the access token until it expires so we don't need to make uneccessary calls
|
18
|
-
LearnWorlds.configuration.persist_access_token_method&.call(client.access_token)
|
18
|
+
LearnWorlds.configuration.persist_access_token_method&.call(client.access_token, client.expires_in)
|
19
19
|
end
|
20
20
|
|
21
21
|
# custom retrieve method can be used if you store the access token on your side until it expires for example
|
@@ -40,6 +40,7 @@ module LearnWorlds
|
|
40
40
|
)
|
41
41
|
response_body = Object.new(response.body)
|
42
42
|
client.access_token = response_body.tokenData.access_token
|
43
|
+
client.expires_in = response_body.tokenData.expires_in
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
data/lib/learn_worlds/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: learnworlds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nuno Correia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|