Class: Analytics::OAuth
- Inherits:
-
Object
- Object
- Analytics::OAuth
- Defined in:
- lib/analytics/oauth.rb
Class Method Summary collapse
Class Method Details
.access_token(token, secret = nil, opts = {}) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/analytics/oauth.rb', line 18 def access_token(token, secret = nil, opts = {}) if token.is_a? ::OAuth::AccessToken token else ::OAuth::AccessToken.new(oauth_consumer, token, secret) end end |
.oauth_consumer ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/analytics/oauth.rb', line 7 def oauth_consumer @consumer ||= ::OAuth::Consumer.new( Analytics.consumer_key, Analytics.consumer_secret, { :site => 'https://www.google.com', :request_token_path => '/accounts/OAuthGetRequestToken', :access_token_path => '/accounts/OAuthGetAccessToken', :authorize_path => '/accounts/OAuthAuthorizeToken' }) end |