class OxfordDictionary::Endpoints::Thesaurus

Interface for the /thesaurus endpoint

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

Constants

ENDPOINT

Public Instance Methods

thesaurus(word:, language:, params: {}) click to toggle source
# File lib/oxford_dictionary/endpoints/thesaurus.rb, line 12
def thesaurus(word:, language:, params: {})
  path = "#{ENDPOINT}/#{language}/#{word}"
  uri = request_uri(path: path, params: params)

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