Class: JumpstartAuth::TwitterClient
- Inherits:
-
Twitter::REST::Client
- Object
- Twitter::REST::Client
- JumpstartAuth::TwitterClient
- Defined in:
- lib/jumpstart_auth/twitter_client.rb
Constant Summary collapse
- SETTINGS_FILE =
"twitter_settings.yml"
- @@credentials =
{ :consumer_key => "mJ5otbhPGNoDCgCL7j5g", :consumer_secret => "M0XkT6GeBnjxdlWHcSGYX1JutMVS9D5ISlkqRfShg" }
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.twitter ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/jumpstart_auth/twitter_client.rb', line 37 def self.twitter credentials = (load_settings or setup_oauth) new do |config| config.consumer_key = credentials[:consumer_key] config.consumer_secret = credentials[:consumer_secret] config.access_token = credentials[:access_token] config.access_token_secret = credentials[:access_token_secret] end end |
Instance Method Details
#followers ⇒ Object
15 16 17 |
# File 'lib/jumpstart_auth/twitter_client.rb', line 15 def followers users(follower_ids) end |
#friends ⇒ Object
19 20 21 |
# File 'lib/jumpstart_auth/twitter_client.rb', line 19 def friends users(friend_ids) end |
#update(message) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/jumpstart_auth/twitter_client.rb', line 23 def update() if .match(/^d\s/i) then _, name, * = .chomp.split .sub!(/.*#{name}\s/, '') begin (name, ) rescue Twitter::Error::Forbidden end else super() end end |