Method: Twitter::Client::Tweets#retweets

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

#retweets(id, options = {}) ⇒ Array<Twitter::Status>

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

Examples:

Return up to 100 of the first retweets of the status with the ID 28561922516

Twitter.retweets(28561922516)

Parameters:

  • id (Integer)

    The numerical ID of the desired status.

  • 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.

  • :include_entities (Boolean, String, Integer)

    Include Tweet Entities when set to true, 't' or 1.

Returns:

Raises:

See Also:

Rate Limited?:

  • Yes

Requires Authentication?:

  • Yes



50
51
52
53
54
# File 'lib/twitter/client/tweets.rb', line 50

def retweets(id, options={})
  get("/1/statuses/retweets/#{id}.json", options).map do |status|
    Twitter::Status.new(status)
  end
end