Method: Twitter::REST::Tweets#statuses

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

#statuses(*tweets) ⇒ Array<Twitter::Tweet> #statuses(*tweets, options) ⇒ Array<Twitter::Tweet>

Returns Tweets

Overloads:

  • #statuses(*tweets) ⇒ Array<Twitter::Tweet>

    Parameters:

  • #statuses(*tweets, options) ⇒ Array<Twitter::Tweet>

    Parameters:

    • tweets (Enumerable<Integer, String, URI, Twitter::Tweet>)

      A collection of Tweet IDs, URIs, or objects.

    • options (Hash)

      A customizable set of options.

    Options Hash (options):

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

See Also:

Rate Limited?:

  • Yes

Authentication:

  • Required



79
80
81
82
83
84
# File 'lib/twitter/rest/tweets.rb', line 79

def statuses(*args)
  arguments = Twitter::Arguments.new(args)
  flat_pmap(arguments.each_slice(MAX_TWEETS_PER_REQUEST)) do |tweets|
    perform_post_with_objects("/1.1/statuses/lookup.json", arguments.options.merge(id: tweets.collect { |u| extract_id(u) }.join(",")), Twitter::Tweet)
  end
end