Module: Twitter
- Includes:
- HTTParty
- Defined in:
- lib/twitter.rb,
lib/twitter/geo.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, Geo, 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
.api_endpoint ⇒ Object
29
30
31
|
# File 'lib/twitter.rb', line 29
def self.api_endpoint
@api_endpoint ||= "api.twitter.com/#{API_VERSION}"
end
|
.api_endpoint=(value) ⇒ Object
33
34
35
|
# File 'lib/twitter.rb', line 33
def self.api_endpoint=(value)
@api_endpoint = value
end
|
.firehose(options = {}) ⇒ Object
37
38
39
|
# File 'lib/twitter.rb', line 37
def self.firehose(options = {})
perform_get("/statuses/public_timeline.json")
end
|
.follower_ids(id, options = {}) ⇒ Object
53
54
55
|
# File 'lib/twitter.rb', line 53
def self.follower_ids(id,options={})
perform_get("/followers/ids/#{id}.json")
end
|
.friend_ids(id, options = {}) ⇒ Object
49
50
51
|
# File 'lib/twitter.rb', line 49
def self.friend_ids(id,options={})
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
63
64
65
|
# File 'lib/twitter.rb', line 63
def self.list_timeline(list_owner_username, slug, query = {})
perform_get("/#{list_owner_username}/lists/#{slug}/statuses.json", :query => query)
end
|
.status(id, options = {}) ⇒ Object
45
46
47
|
# File 'lib/twitter.rb', line 45
def self.status(id,options={})
perform_get("/statuses/show/#{id}.json")
end
|
.timeline(id, options = {}) ⇒ Object
57
58
59
|
# File 'lib/twitter.rb', line 57
def self.timeline(id, options={})
perform_get("/statuses/user_timeline/#{id}.json", :query => options)
end
|
.user(id, options = {}) ⇒ Object
41
42
43
|
# File 'lib/twitter.rb', line 41
def self.user(id,options={})
perform_get("/users/show/#{id}.json")
end
|