Module: GogoKit::Client::Search

Includes:
Utils
Included in:
GogoKit::Client
Defined in:
lib/gogokit/client/search.rb

Overview

GogoKit::Client methods for searching for viagogo entities

Instance Method Summary collapse

Methods included from Utils

#object_from_response

Instance Method Details

#search(query, options = {}) ⇒ GogoKit::PagedResource

Search for entities that match a given query

Parameters:

  • query (String)

    The query text to be used to match entities

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

    Optional options

Returns:

See Also:



16
17
18
19
20
21
22
23
24
# File 'lib/gogokit/client/search.rb', line 16

def search(query, options = {})
  options[:params] ||= {}
  options[:params] = options[:params].merge(query: query)
  object_from_response(GogoKit::PagedResource,
                       GogoKit::SearchResultsRepresenter,
                       :get,
                       get_root.links['viagogo:search'].href,
                       options)
end