<commit_before>require 'oxford_dictionary/deprecated_request'
require 'oxford_dictionary/api_objects/entry_response'

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

      def entry(query, params = {})
        entry_request(query, params)
      end

      def entry_definitions(query, params = {})
        params[:end] = 'definitions'
        entry_request(query, params)
      end

      def entry_examples(query, params = {})
        params[:end] = 'examples'
        entry_request(query, params)
      end

      def entry_pronunciations(query, params = {})
        params[:end] = 'pronunciations'
        entry_request(query, params)
      end
<commit_msg>Deprecate V1 entry endpoint calls<commit_after>require 'oxford_dictionary/deprecated_request'
require 'oxford_dictionary/api_objects/entry_response'

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

      def entry(query, params = {})
        entry_request(query, params)
      end

      def entry_definitions(query, params = {})
        warn '''
        Client#entry_defintions is DEPRECATED and will become non-functional
        on June 30, 2019. Use Client#entry instead. Reference
        https://github.com/swcraig/oxford-dictionary/pull/8 for more
        information. Check out OxfordDictionary::Endpoints::Entries for the
        interface to use. Specifically use it with
        params: { fields: \'definitions\' }
        '''

        params[:end] = 'definitions'
        entry_request(query, params)
      end

      def entry_examples(query, params = {})
        warn '''
        Client#entry_examples is DEPRECATED and will become non-functional
        on June 30, 2019. Use Client#entry instead. Reference
        https://github.com/swcraig/oxford-dictionary/pull/8 for more
        information. Check out OxfordDictionary::Endpoints::Entries for the
        interface to use. Specifically use it with
        params: { fields: \'examples\' }
        '''

        params[:end] = 'examples'
        entry_request(query, params)
      end

      def entry_pronunciations(query, params = {})
        warn '''
        Client#entry_pronunciations is DEPRECATED and will become non-functional
        on June 30, 2019. Use Client#entry instead. Reference
        https://github.com/swcraig/oxford-dictionary/pull/8 for more
        information. Check out OxfordDictionary::Endpoints::Entries for the
        interface to use. Specifically use it with
        params: { fields: \'pronunciations\' }
        '''

        params[:end] = 'pronunciations'
        entry_request(query, params)
      end

{'fraction_non_alphanumeric': 0.08855442772138607, 'fraction_numerical': 0.0077003850192509625, 'mean_word_length': 2.7804232804232805, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4932876', 'n_tokens_mistral': 797, 'n_tokens_neox': 741, 'n_words': 205}