Method: Twitter::REST::Users#user_search

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

#user_search(query, options = {}) ⇒ Array<Twitter::User>

Returns users that match the given query

Parameters:

  • query (String)

    The search query to run against people search.

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

    A customizable set of options.

Options Hash (options):

  • :count (Integer)

    The number of people to retrieve. Maxiumum of 20 allowed per page.

  • :page (Integer)

    Specifies the page of results to retrieve.

Returns:

Raises:

See Also:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



268
269
270
271
# File 'lib/twitter/rest/users.rb', line 268

def user_search(query, options = {})
  options = options.dup
  perform_get_with_objects("/1.1/users/search.json", options.merge(q: query), Twitter::User)
end