Module: Twitter

Includes:
HTTParty
Defined in:
lib/twitter.rb,
lib/twitter/base.rb,
lib/twitter/oauth.rb,
lib/twitter/search.rb,
lib/twitter/trends.rb,
lib/twitter/request.rb,
lib/twitter/httpauth.rb,
lib/twitter/local_trends.rb

Defined Under Namespace

Classes: Base, General, HTTPAuth, InformTwitter, LocalTrends, NotFound, OAuth, RateLimitExceeded, Request, Search, Trends, TwitterError, Unauthorized, Unavailable

Constant Summary collapse

API_VERSION =
"1".freeze

Class Method Summary collapse

Class Method Details

.firehoseObject



30
31
32
# File 'lib/twitter.rb', line 30

def self.firehose
  perform_get("/statuses/public_timeline.json")
end

.follower_ids(id) ⇒ Object



46
47
48
# File 'lib/twitter.rb', line 46

def self.follower_ids(id)
  perform_get("/followers/ids/#{id}.json")
end

.friend_ids(id) ⇒ Object



42
43
44
# File 'lib/twitter.rb', line 42

def self.friend_ids(id)
  perform_get("/friends/ids/#{id}.json")
end

.list_timeline(list_owner_username, slug, query = {}) ⇒ Object

:per_page = max number of statues to get at once :page = which page of tweets you wish to get



56
57
58
# File 'lib/twitter.rb', line 56

def self.list_timeline(list_owner_username, slug, query = {})
  perform_get("/#{list_owner_username}/lists/#{slug}/statuses.json", :query => query)
end

.status(id) ⇒ Object



38
39
40
# File 'lib/twitter.rb', line 38

def self.status(id)
  perform_get("/statuses/show/#{id}.json")
end

.timeline(id, options = {}) ⇒ Object



50
51
52
# File 'lib/twitter.rb', line 50

def self.timeline(id, options={})
  perform_get("/statuses/user_timeline/#{id}.json", :query => options)
end

.user(id) ⇒ Object



34
35
36
# File 'lib/twitter.rb', line 34

def self.user(id)
  perform_get("/users/show/#{id}.json")
end