Minimalistic promise-based node.js client for the Wordnik API
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 3 commits ahead of cpetzold:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore
.npmignore
README.md
index.js
package-lock.json
package.json

README.md

node-wordnik

A simple, Promise-based node.js client for the Wordnik API http://developer.wordnik.com/

Based on node-wordnik.

Example

// var APIKEY = process.env.WORDNIK_KEY
var Wordnik = require('wordnik-as-promised'),
    wn;

wn = new Wordnik(APIKEY);

wn.word('promise', {
  useCanonical: true,
  includeSuggestions: true
})
.tap(console.log)
.then(function(word) {
  return word.related({
    limitPerRelationShipType: 2
  });
)
.tap(console.log)
.then(function(groups) {
  // do something with these, maybe?
  return groups;
})
.catch(console.error);

wn.definitions('compliance').then(console.log, console.error);