Module: OxfordDictionary::Endpoints::InflectionEndpoint

Includes:
DeprecatedRequest
Included in:
Client
Defined in:
lib/oxford_dictionary/endpoints/inflection_endpoint.rb

Overview

Interface to ‘/inflections’ endpoint

Constant Summary collapse

ENDPOINT =
'inflections'.freeze

Constants included from DeprecatedRequest

DeprecatedRequest::ACCEPT_TYPE, DeprecatedRequest::ADVANCED_FILTERS, DeprecatedRequest::BASE, DeprecatedRequest::HTTP_OK

Instance Method Summary collapse

Methods included from DeprecatedRequest

#request

Instance Method Details

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



11
12
13
14
15
16
17
18
19
20
# File 'lib/oxford_dictionary/endpoints/inflection_endpoint.rb', line 11

def inflection(query, params = {})
  warn '''
    Client#inflection is DEPRECATED and will become non-functional
    on June 30, 2019. Use Client#lemma instead. Reference
    github.com/swcraig/oxford-dictionary/pull/10 for for more information.
    Check out OxfordDictionary::Endpoints::Lemmas#lemma for the interface
    to use.
  '''
  EntryResponse.new(request(ENDPOINT, query, params)['results'][0])
end