Class: OxfordDictionary::Endpoints::Lemmas
- Defined in:
- lib/oxford_dictionary/endpoints/lemmas.rb
Overview
Interface for the /lemmas endpoint
API documentation can be found here: developer.oxforddictionaries.com/documentation
Constant Summary collapse
- ENDPOINT =
'lemmas'.freeze
Instance Method Summary collapse
-
#lemma(word:, language:, params: {}) ⇒ OpenStruct
Returns all possible lemmas for a word.
Methods inherited from Endpoint
Constructor Details
This class inherits a constructor from OxfordDictionary::Endpoints::Endpoint
Instance Method Details
#lemma(word:, language:, params: {}) ⇒ OpenStruct
Returns all possible lemmas for a word
26 27 28 29 30 31 32 |
# File 'lib/oxford_dictionary/endpoints/lemmas.rb', line 26 def lemma(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 |