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

the API url that getData forms no longer seems to work #13

Closed
FranciscoG opened this issue Jul 26, 2018 · 3 comments · Fixed by #14
Closed

the API url that getData forms no longer seems to work #13

FranciscoG opened this issue Jul 26, 2018 · 3 comments · Fixed by #14

Comments

@FranciscoG
Copy link

FranciscoG commented Jul 26, 2018

When I do this:

var urban = require('urban'),
    catfish = urban('catfish');

catfish.first(function(json) {
    console.log(json);
});

Dictionary.fn.getData @ https://github.com/mvrilo/urban/blob/master/lib/urban.js#L66

The above script will create a URL for the GET request and it doesn't work anymore
http://api.urbandictionary.com/v0/define?page=undefined&term=catfish

However

if you remove page=undefined though, it works
http://api.urbandictionary.com/v0/define?term=catfish

Is anyone else experiencing this? this lib just completely stopped working for me recently and it's just for this small reason.

@generalwrex
Copy link

Thank you @FranciscoG, it allowed me to fix a discord bot ;) Did the same thing, I removed &page=

d2d944c7dca1cd8ae282dcdb0d628726

@gt-c
Copy link

gt-c commented Jul 27, 2018

This happened to me too, I decided I'm not going to deal with this out of date unpromisified library, so I switched to another urban dictionary lib which I have found much better.

@FranciscoG
Copy link
Author

yeah i completely removed it and I'm just hitting the api myself

https://github.com/FranciscoG/DerpyBot/blob/master/bot/commands/fun/urban.js

euank added a commit to euank/urban that referenced this issue Jul 28, 2018
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

Successfully merging a pull request may close this issue.

3 participants