Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work for mutli-word searches #30

Open
agzam opened this issue Jul 19, 2024 · 0 comments
Open

Doesn't work for mutli-word searches #30

agzam opened this issue Jul 19, 2024 · 0 comments

Comments

@agzam
Copy link
Owner

agzam commented Jul 19, 2024

I just realized that the package just can't do multi-word lookup like "break the law" or "under the weather". I couldn't figure out how to make it work for xml endpoint, so this works:

GET https://www.dictionaryapi.com/api/v3/references/thesaurus/json/break%20the%20law?key=MYKEY

but the similar request to the XML endpoint, doesn't:

GET https://www.dictionaryapi.com/api/v1/references/thesaurus/xml/break%20the%20law?key=MYKEY

I guess this is yet another reason to finally switch to JSON API - which, sadly, would require a big overhaul.
Reminder, initially I wrote the package when JSON version of the API did not exist yet. I guess, Webster still keeps xml version for backward compatibility. A potential downside of switching to JSON that it's a rate-limited endpoint, the FAQ says it's limited to 1K queries a day. Whereas xml endpoint doesn't seem to enforce that limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant