Class: Withings::Api::AccessTokenResponse
- Inherits:
-
Object
- Object
- Withings::Api::AccessTokenResponse
- Defined in:
- lib/withings-api/oauth_base.rb
Instance Method Summary collapse
- #access_token ⇒ Object
-
#initialize(oauth_access_token) ⇒ AccessTokenResponse
constructor
A new instance of AccessTokenResponse.
- #secret ⇒ Object
- #token ⇒ Object (also: #key)
- #user_id ⇒ Object
Constructor Details
#initialize(oauth_access_token) ⇒ AccessTokenResponse
Returns a new instance of AccessTokenResponse.
98 99 100 |
# File 'lib/withings-api/oauth_base.rb', line 98 def initialize(oauth_access_token) @oauth_access_token = oauth_access_token end |
Instance Method Details
#access_token ⇒ Object
116 117 118 |
# File 'lib/withings-api/oauth_base.rb', line 116 def access_token AccessToken.new(self.key, self.secret) end |
#secret ⇒ Object
108 109 110 |
# File 'lib/withings-api/oauth_base.rb', line 108 def secret @oauth_access_token.secret end |
#token ⇒ Object Also known as: key
102 103 104 |
# File 'lib/withings-api/oauth_base.rb', line 102 def token @oauth_access_token.token end |
#user_id ⇒ Object
112 113 114 |
# File 'lib/withings-api/oauth_base.rb', line 112 def user_id @oauth_access_token.params["userid"] end |