Module: Twitter::API::Timelines
Constant Summary collapse
- DEFAULT_TWEETS_PER_REQUEST =
20- MAX_TWEETS_PER_REQUEST =
200
Constants included from Utils
Instance Method Summary collapse
-
#home_timeline(options = {}) ⇒ Array<Twitter::Tweet>
Returns the 20 most recent Tweets, including retweets if they exist, posted by the authenticating user and the users they follow.
-
#mentions_timeline(options = {}) ⇒ Array<Twitter::Tweet>
(also: #mentions)
Returns the 20 most recent mentions (statuses containing @username) for the authenticating user.
-
#retweeted_by_me(options = {}) ⇒ Array<Twitter::Tweet>
Returns the 20 most recent retweets posted by the authenticating user.
-
#retweeted_by_user(user, options = {}) ⇒ Array<Twitter::Tweet>
(also: #retweeted_by)
Returns the 20 most recent retweets posted by the specified user.
-
#retweeted_to_me(options = {}) ⇒ Array<Twitter::Tweet>
Returns the 20 most recent retweets posted by users the authenticating user follow.
-
#retweets_of_me(options = {}) ⇒ Array<Twitter::Tweet>
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
-
#user_timeline(user, options = {}) ⇒ Array<Twitter::Tweet>
Returns the 20 most recent Tweets posted by the specified user.
Instance Method Details
#home_timeline(options = {}) ⇒ Array<Twitter::Tweet>
This method can only return up to 800 Tweets, including retweets.
Returns the 20 most recent Tweets, including retweets if they exist, posted by the authenticating user and the users they follow
123 124 125 |
# File 'lib/twitter/api/timelines.rb', line 123 def home_timeline(={}) objects_from_response(Twitter::Tweet, :get, "/1.1/statuses/home_timeline.json", ) end |
#mentions_timeline(options = {}) ⇒ Array<Twitter::Tweet> Also known as: mentions
This method can only return up to 800 Tweets.
Returns the 20 most recent mentions (statuses containing @username) for the authenticating user
27 28 29 |
# File 'lib/twitter/api/timelines.rb', line 27 def mentions_timeline(={}) objects_from_response(Twitter::Tweet, :get, "/1.1/statuses/mentions_timeline.json", ) end |
#retweeted_by_me(options = {}) ⇒ Array<Twitter::Tweet>
This method can only return up to 3,200 Tweets.
Returns the 20 most recent retweets posted by the authenticating user
98 99 100 101 102 |
# File 'lib/twitter/api/timelines.rb', line 98 def retweeted_by_me(={}) retweets_from_timeline() do |opts| user_timeline(opts) end end |
#retweeted_by_user(user, options = {}) ⇒ Array<Twitter::Tweet> Also known as: retweeted_by
This method can only return up to 3,200 Tweets.
Returns the 20 most recent retweets posted by the specified user
74 75 76 77 78 |
# File 'lib/twitter/api/timelines.rb', line 74 def retweeted_by_user(user, ={}) retweets_from_timeline() do |opts| user_timeline(user, opts) end end |
#retweeted_to_me(options = {}) ⇒ Array<Twitter::Tweet>
This method can only return up to 800 Tweets, including retweets.
Returns the 20 most recent retweets posted by users the authenticating user follow.
145 146 147 148 149 |
# File 'lib/twitter/api/timelines.rb', line 145 def retweeted_to_me(={}) retweets_from_timeline() do |opts| home_timeline(opts) end end |
#retweets_of_me(options = {}) ⇒ Array<Twitter::Tweet>
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others
167 168 169 |
# File 'lib/twitter/api/timelines.rb', line 167 def retweets_of_me(={}) objects_from_response(Twitter::Tweet, :get, "/1.1/statuses/retweets_of_me.json", ) end |
#user_timeline(user, options = {}) ⇒ Array<Twitter::Tweet>
This method can only return up to 3,200 Tweets.
Returns the 20 most recent Tweets posted by the specified user
52 53 54 |
# File 'lib/twitter/api/timelines.rb', line 52 def user_timeline(*args) objects_from_response_with_user(Twitter::Tweet, :get, "/1.1/statuses/user_timeline.json", args) end |