Skip to content

Commit

Permalink
Added definitions, topExample, relatedWords, pronunciations, scrabble…
Browse files Browse the repository at this point in the history
…Score
  • Loading branch information
dariusk committed Feb 4, 2013
1 parent 428d559 commit 7f577f5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
10 changes: 9 additions & 1 deletion index.js
Expand Up @@ -6,7 +6,15 @@ var word = new Wordnik.Word({word: 'kings', params:{includeSuggestions:true}});
word.getWord().then(function(word) {
word.getExamples().then(function(word) {
word.getDefinitions().then(function(word) {
console.log(word);
word.getTopExample().then(function(word) {
word.getRelatedWords().then(function(word) {
word.getPronunciations().then(function(word) {
word.getScrabbleScore().then(function(word) {
console.log(word);
});
});
});
});
});
});
});
12 changes: 12 additions & 0 deletions lib/wordnik-bb.js
Expand Up @@ -98,6 +98,18 @@ exports.init = function(APIKEY) {
},
getDefinitions: function() {
return this.callWordnik("/definitions");
},
getTopExample: function() {
return this.callWordnik("/topExample");
},
getRelatedWords: function() {
return this.callWordnik("/relatedWords");
},
getPronunciations: function() {
return this.callWordnik("/pronunciations");
},
getScrabbleScore: function() {
return this.callWordnik("/scrabbleScore");
}
})
};
Expand Down

0 comments on commit 7f577f5

Please sign in to comment.