lib/tanita/api/client.rb in tanita-api-client-0.2.1 vs lib/tanita/api/client.rb in tanita-api-client-0.2.2

- old
+ new

@@ -35,21 +35,21 @@ :client_id => @client_id, :redirect_uri => @redirect_uri, :scope => @scopes.join(','), :response_type => 'code' } - generate_uri('/oauth/auth', params) + generate_uri(AUTH_URL_PATH, params) end def exchange_token(auth_code:) params = { :client_id => @client_id, :client_secret => @client_secret, :redirect_uri => DEFAULT_REDIRECT_URI, :code => auth_code, :grant_type => 'authorization_code' } - res = request('/oauth/token', params) + res = request(TOKEN_URL_PATH, params) token = parse_json(res.body) raise Error.new("#{self.class}.#{__method__}: #{token[:error]}") if token.key? :error token