Class: TwitterToken
- Inherits:
-
ConsumerToken
- Object
- ConsumerToken
- TwitterToken
- Defined in:
- lib/oauth/models/consumers/services/twitter_token.rb
Constant Summary collapse
- TWITTER_SETTINGS =
{:site=>"http://twitter.com"}
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.consumer ⇒ Object
4 5 6 |
# File 'lib/oauth/models/consumers/services/twitter_token.rb', line 4 def self.consumer @consumer||=OAuth::Consumer.new credentials[:key],credentials[:secret],TWITTER_SETTINGS end |
Instance Method Details
#client ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/oauth/models/consumers/services/twitter_token.rb', line 8 def client unless @client @twitter_oauth=Twitter::OAuth.new TwitterToken.consumer.key,TwitterToken.consumer.secret @twitter_oauth. token,secret @client=Twitter::Base.new(@twitter_oauth) end @client end |