Module: Twitter::REST::API::Timelines
Constant Summary collapse
- DEFAULT_TWEETS_PER_REQUEST =
20- MAX_TWEETS_PER_REQUEST =
200
Constants included from Utils
Utils::DEFAULT_CURSOR, Utils::URI_SUBSTRING
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
114 115 116 |
# File 'lib/twitter/rest/api/timelines.rb', line 114 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
26 27 28 |
# File 'lib/twitter/rest/api/timelines.rb', line 26 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
91 92 93 94 95 |
# File 'lib/twitter/rest/api/timelines.rb', line 91 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
69 70 71 72 73 |
# File 'lib/twitter/rest/api/timelines.rb', line 69 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.
134 135 136 137 138 |
# File 'lib/twitter/rest/api/timelines.rb', line 134 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
154 155 156 |
# File 'lib/twitter/rest/api/timelines.rb', line 154 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
49 50 51 |
# File 'lib/twitter/rest/api/timelines.rb', line 49 def user_timeline(*args) objects_from_response_with_user(Twitter::Tweet, :get, "/1.1/statuses/user_timeline.json", args) end |