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:

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

  • :page (Integer)

    Specifies the page of results to retrieve.

Returns:

Raises:

See Also:



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