Sha256: 7ac979df052023d032962b467e1a17fc4d2abc87d46c5562b2d3b00b795286e7

Contents?: true

Size: 796 Bytes

Versions: 3

Compression:

Stored size: 796 Bytes

Contents

require 'oxford_dictionary/deprecated_request'
require 'oxford_dictionary/api_objects/entry_response'

module OxfordDictionary
  module Endpoints
    # Interface to '/inflections' endpoint
    module InflectionEndpoint
      include OxfordDictionary::DeprecatedRequest
      ENDPOINT = 'inflections'.freeze

      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
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oxford_dictionary-1.3.1 lib/oxford_dictionary/endpoints/inflection_endpoint.rb
oxford_dictionary-1.3.0 lib/oxford_dictionary/endpoints/inflection_endpoint.rb
oxford_dictionary-1.2.0 lib/oxford_dictionary/endpoints/inflection_endpoint.rb