Class: Withings::Api::AccessTokenResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/withings-api/oauth_base.rb

Instance Method Summary collapse

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_tokenObject



116
117
118
# File 'lib/withings-api/oauth_base.rb', line 116

def access_token
  AccessToken.new(self.key, self.secret)
end

#secretObject



108
109
110
# File 'lib/withings-api/oauth_base.rb', line 108

def secret
  @oauth_access_token.secret
end

#tokenObject Also known as: key



102
103
104
# File 'lib/withings-api/oauth_base.rb', line 102

def token
  @oauth_access_token.token
end

#user_idObject



112
113
114
# File 'lib/withings-api/oauth_base.rb', line 112

def user_id
  @oauth_access_token.params["userid"]
end