Class: OxfordDictionary::Endpoints::Entries
- Defined in:
- lib/oxford_dictionary/endpoints/entries.rb
Overview
Interface for the /entries endpoint
API documentation can be found here: developer.oxforddictionaries.com/documentation
Constant Summary collapse
- ENDPOINT =
'entries'.freeze
Instance Method Summary collapse
-
#entry(word:, dataset:, params: {}) ⇒ OpenStruct
Return all the entries for a word.
Methods inherited from Endpoint
Constructor Details
This class inherits a constructor from OxfordDictionary::Endpoints::Endpoint
Instance Method Details
#entry(word:, dataset:, params: {}) ⇒ OpenStruct
Return all the entries for a word
22 23 24 25 26 27 28 |
# File 'lib/oxford_dictionary/endpoints/entries.rb', line 22 def entry(word:, dataset:, params: {}) path = "#{ENDPOINT}/#{dataset}/#{word}" uri = request_uri(path: path, params: params) response = @request_client.get(uri: uri) deserialize.call(response.body) end |