class OxfordDictionary::Endpoints::Search

Interface for the /search endpoint

API documentation can be found here: developer.oxforddictionaries.com/documentation

Constants

ENDPOINT

Public Instance Methods

search_translation(source_language:, target_language:, params: {}) click to toggle source
# File lib/oxford_dictionary/endpoints/search.rb, line 20
def search_translation(source_language:, target_language:, params: {})
  path = "#{ENDPOINT}/translations/#{source_language}/#{target_language}"
  uri = request_uri(path: path, params: params)

  response = @request_client.get(uri: uri)
  deserialize.call(response.body)
end