Skip to content

Commit

Permalink
Deprecate V1 Thesaurus functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
swcraig committed Jun 23, 2019
1 parent e0a09bd commit b5e27ea
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 @@ -41,16 +41,43 @@ def entry_sentences(query, params = {})
end

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

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

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

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

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

params[:end] = 'synonyms;antonyms'
entry_request(query, params)
end
Expand Down

0 comments on commit b5e27ea

Please sign in to comment.