Calling Big Huge Thesaurus's API with jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url : "http://words.bighugelabs.com/api/2/youapikey/" + word + "/json?callback=?", | |
dataType : 'json', | |
complete : function(jqXHR, textStatus) { | |
if (textStatus == 'parsererror') { | |
// Did not find any synonyms | |
alert("404 error because no synonyms exist for this word"); | |
} | |
}, | |
success : function(data) { | |
// Found synonyms | |
alert(data); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment