Module: OxfordDictionary::Endpoints::SearchEndpoint

Includes:
Request
Included in:
Client
Defined in:
lib/oxford_dictionary/endpoints/search_endpoint.rb

Overview

Interface to ‘/search’ endpoint

Constant Summary collapse

ENDPOINT =
'search'.freeze

Constants included from Request

Request::ACCEPT_TYPE, Request::ADVANCED_FILTERS, Request::BASE, Request::HTTP_OK

Instance Method Summary collapse

Methods included from Request

#request

Instance Method Details

#search(query, params = {}) ⇒ Object



11
12
13
14
# File 'lib/oxford_dictionary/endpoints/search_endpoint.rb', line 11

def search(query, params = {})
  params[:q] = query
  ListResponse.new(request(ENDPOINT, query, params))
end