nypl_ruby_util 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/platform_api_client.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7792a53b4410092c9b4c215da151d9bdf6dbe37e37af60c35be4bc07b2ec419e
|
4
|
+
data.tar.gz: 864bbf4ae3f196c2810884779b91f0f912871e9cc3913bb19c608926681f7560
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 330aabe2c15a245efac358c65ae96ed79ef6928d6f1b2cf92a8b136df54429dd68dcc0e5b6e77b7677cbbd716db76fc81daed2e9cd54c44bfa008d22c8a2a9cb
|
7
|
+
data.tar.gz: a95be077f61ec0c17d0a4b1c7956e35a66b98e04a4c1cd4093db9ab349bf81bc4d9d986c441cd5f801921aa3c1bd4f300bbd52774ecfb0e9809dc4640792f71b
|
data/lib/platform_api_client.rb
CHANGED
@@ -61,6 +61,7 @@ class PlatformApiClient
|
|
61
61
|
|
62
62
|
# Authorizes the request.
|
63
63
|
def authenticate!
|
64
|
+
$logger.debug('authenticating')
|
64
65
|
# NOOP if we've already authenticated
|
65
66
|
return nil if ! access_token.nil?
|
66
67
|
|
@@ -81,8 +82,10 @@ class PlatformApiClient
|
|
81
82
|
end
|
82
83
|
|
83
84
|
if response.code == '200'
|
84
|
-
access_token = JSON.parse(response.body)["access_token"]
|
85
|
+
self.access_token = JSON.parse(response.body)["access_token"]
|
86
|
+
$logger.debug('got token')
|
85
87
|
else
|
88
|
+
$logger.debug('no token')
|
86
89
|
nil
|
87
90
|
end
|
88
91
|
end
|