Module: Mastodon::REST::Search

Includes:
Utils
Included in:
API
Defined in:
lib/mastodon/rest/search.rb

Instance Method Summary collapse

Methods included from Utils

#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object

Instance Method Details

#search(query, options = {}) ⇒ Mastodon::Results

Search for content

Parameters:

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

Options Hash (options):

  • :q (String)

    The search query

  • :resolve (Boolean)

    Whether to resolve non-local accounts

  • :limit (Integer)

Returns:



15
16
17
# File 'lib/mastodon/rest/search.rb', line 15

def search(query, options = {})
  perform_request_with_object(:get, '/api/v2/search', { q: query }.merge(options), Mastodon::Results)
end