Skip to content

Commit

Permalink
Deprecate V1 entry endpoint calls
Browse files Browse the repository at this point in the history
Missed these in #8.

As per the `warn` in the methods, use the new `Client#entry` method with
named parameters using the `params` hash to define which information you
would like to get back in the call.
  • Loading branch information
swcraig committed Jun 23, 2019
1 parent 7dd3d64 commit b8e0723
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lib/oxford_dictionary/endpoints/entry_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,43 @@ def entry(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
Expand Down

0 comments on commit b8e0723

Please sign in to comment.