Module: Twitter::REST::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.
Methods included from Utils
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
112 113 114 |
# File 'lib/twitter/rest/timelines.rb', line 112 def home_timeline( = {}) perform_get_with_objects("/1.1/statuses/home_timeline.json", , Twitter::Tweet) 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
25 26 27 |
# File 'lib/twitter/rest/timelines.rb', line 25 def mentions_timeline( = {}) perform_get_with_objects("/1.1/statuses/mentions_timeline.json", , Twitter::Tweet) 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
90 91 92 93 94 |
# File 'lib/twitter/rest/timelines.rb', line 90 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
68 69 70 71 72 |
# File 'lib/twitter/rest/timelines.rb', line 68 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.
131 132 133 134 135 |
# File 'lib/twitter/rest/timelines.rb', line 131 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
150 151 152 |
# File 'lib/twitter/rest/timelines.rb', line 150 def retweets_of_me( = {}) perform_get_with_objects("/1.1/statuses/retweets_of_me.json", , Twitter::Tweet) 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
48 49 50 |
# File 'lib/twitter/rest/timelines.rb', line 48 def user_timeline(*args) objects_from_response_with_user(Twitter::Tweet, :get, "/1.1/statuses/user_timeline.json", args) end |