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

Examples:

client.user_search('Erik Michaels-Ober')

Parameters:

  • The search query to run against people search.

  • (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :count (Integer)

    The number of people to retrieve.

  • :page (Integer)

    Specifies the page of results to retrieve.

Returns:

Raises:

  • Error raised when supplied user credentials are not valid.

See Also:

API:

  • public



316
317
318
# File 'lib/twitter/rest/users.rb', line 316

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