Method: Twitter::REST::Tweets#retweets

Defined in:
lib/twitter/rest/tweets.rb

#retweets(tweet, options = {}) ⇒ Array<Twitter::Tweet>

Returns up to 100 of the first retweets of a given tweet

Parameters:

  • tweet (Integer, String, URI, Twitter::Tweet)

    A Tweet ID, URI, or object.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :count (Integer)

    Specifies the number of records to retrieve. Must be less than or equal to 100.

  • :trim_user (Boolean, String, Integer)

    Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.

Returns:

Raises:

See Also:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



29
30
31
# File 'lib/twitter/rest/tweets.rb', line 29

def retweets(tweet, options = {})
  perform_get_with_objects("/1.1/statuses/retweets/#{extract_id(tweet)}.json", options, Twitter::Tweet)
end