Module: OauthTwitter::API::Oauth

Included in:
OauthTwitter
Defined in:
lib/oauth_twitter/api/oauth.rb

Constant Summary collapse

PATH =
{
  :oauth_authenticate => '/oauth/authenticate',
  :oauth_authorize => '/oauth/authorize',
  :oauth_access_token => '/oauth/access_token',
  :oauth_request_token => '/oauth/request_token'
}

Instance Method Summary collapse

Instance Method Details

#oauth_access_token(params = {}, options = {}) ⇒ Object



19
20
21
# File 'lib/oauth_twitter/api/oauth.rb', line 19

def oauth_access_token(params={}, options={})
  return send_request(:POST, PATH[:oauth_access_token], params, true, options)
end

#oauth_authenticate(params = {}, options = {}) ⇒ Object



11
12
13
# File 'lib/oauth_twitter/api/oauth.rb', line 11

def oauth_authenticate(params={}, options={})
  return send_request(:GET, PATH[:oauth_authenticate], params, true, options)
end

#oauth_authorize(params = {}, options = {}) ⇒ Object



15
16
17
# File 'lib/oauth_twitter/api/oauth.rb', line 15

def oauth_authorize(params={}, options={})
  return send_request(:GET, PATH[:oauth_authorize], params, true, options)
end

#oauth_request_token(params = {}, options = {}) ⇒ Object



23
24
25
26
# File 'lib/oauth_twitter/api/oauth.rb', line 23

def oauth_request_token(params={}, options={})
  callback_url = params[:oauth_callback] || Config.oauth_callback
  return send_request(:POST, PATH[:oauth_request_token], {}, [false, {:oauth_callback => callback_url}], options)
end