urban-dictionary-client
Version:
Node JS Client for the Urban Dictionary API
26 lines (21 loc) • 562 B
JavaScript
import axios from 'axios';
var API_BASE_PATH = 'https://api.urbandictionary.com';
var autocompleteExtra = function autocompleteExtra(term) {
return axios.get("".concat(API_BASE_PATH, "/v0/autocomplete-extra"), {
params: {
term: term
}
}).then(function (response) {
return response.data;
});
};
var search = function search(term) {
return axios.get("".concat(API_BASE_PATH, "/v0/define"), {
params: {
term: term
}
}).then(function (response) {
return response.data;
});
};
export { autocompleteExtra, search };