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
- #oauth_access_token(params = {}, options = {}) ⇒ Object
- #oauth_authenticate(params = {}, options = {}) ⇒ Object
- #oauth_authorize(params = {}, options = {}) ⇒ Object
- #oauth_request_token(params = {}, options = {}) ⇒ Object
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={}, ={}) return send_request(:POST, PATH[:oauth_access_token], params, true, ) end |
#oauth_authenticate(params = {}, options = {}) ⇒ Object
11 12 13 |
# File 'lib/oauth_twitter/api/oauth.rb', line 11 def oauth_authenticate(params={}, ={}) return send_request(:GET, PATH[:oauth_authenticate], params, true, ) end |
#oauth_authorize(params = {}, options = {}) ⇒ Object
15 16 17 |
# File 'lib/oauth_twitter/api/oauth.rb', line 15 def (params={}, ={}) return send_request(:GET, PATH[:oauth_authorize], params, true, ) 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={}, ={}) callback_url = params[:oauth_callback] || Config.oauth_callback return send_request(:POST, PATH[:oauth_request_token], {}, [false, {:oauth_callback => callback_url}], ) end |