open_api_smart_recruiters_sdk 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/smart_recruiters/api_client.rb +1 -2
- data/lib/smart_recruiters/authorization.rb +11 -1
- data/lib/smart_recruiters/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: 439f69e8d60e69b97fe4653a60036b44ed682a19c91db7483c447ef7530dfdbd
|
4
|
+
data.tar.gz: 3de01e25124ed31b652458fa548c73602f200f8479bd10fa93cfdaf97826ffda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6599f826b2a0e1b5e400cab4cace8aa24e6cc055a2c24d977d7b399f1a56db22f4623b3291f53cf2aff6e672bdf918783cef1958c533041dd70d605593947c19
|
7
|
+
data.tar.gz: 8766458b663269de4ff7f8b4a85487346b2d2d332f748067dbd7dd227fd78549a3482342b96c40a113a8a1359948e25196c639dacfd611e1a30a3d2b647239cd
|
data/Gemfile.lock
CHANGED
@@ -17,9 +17,8 @@ module SmartRecruiters
|
|
17
17
|
|
18
18
|
# Initializes the ApiClient
|
19
19
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
20
|
-
def initialize(
|
20
|
+
def initialize(config = Configuration.default)
|
21
21
|
@config = config
|
22
|
-
@config.access_token = access_token
|
23
22
|
@user_agent = "SmartRecruiters/#{VERSION}/ruby"
|
24
23
|
@default_headers = {
|
25
24
|
'Content-Type' => 'application/json',
|
@@ -53,9 +53,19 @@ module SmartRecruiters
|
|
53
53
|
}
|
54
54
|
)
|
55
55
|
|
56
|
-
|
56
|
+
if token.expired?
|
57
|
+
token.refresh!({ client_id: config.client_id, client_secret: config.client_secret })
|
58
|
+
|
59
|
+
load_token(token)
|
60
|
+
end
|
57
61
|
|
58
62
|
token
|
59
63
|
end
|
64
|
+
|
65
|
+
def load_token(token)
|
66
|
+
SmartRecruiters::Configuration.default.access_token = token.token
|
67
|
+
SmartRecruiters::Configuration.default.token_expires_at = token.expires_at
|
68
|
+
SmartRecruiters::Configuration.default.refresh_token = token.refresh_token
|
69
|
+
end
|
60
70
|
end
|
61
71
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open_api_smart_recruiters_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OneNeptune
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|