class Tandarb::Oauth
Constants
- BASE_URL
- TOKEN_URL
Public Class Methods
refresh_token(client_id, client_secret, refresh_token, redirect_uri)
click to toggle source
# File lib/tandarb/oauth.rb, line 25 def self.refresh_token(client_id, client_secret, refresh_token, redirect_uri) body = { client_id: client_id, client_secret: client_secret, refresh_token: refresh_token, redirect_uri: redirect_uri, grant_type: 'refresh_token' } HTTParty.post(TOKEN_URL, body: body).parsed_response end
request_token(code: code, client_id: client_id, client_secret: client_secret, redirect_uri: redirect_uri)
click to toggle source
# File lib/tandarb/oauth.rb, line 13 def self.request_token(code: code, client_id: client_id, client_secret: client_secret, redirect_uri: redirect_uri) body = { code: code, client_id: client_id, client_secret: client_secret, redirect_uri: redirect_uri, grant_type: 'authorization_code' } HTTParty.post(TOKEN_URL, body: body).parsed_response end