wordnik-as-promised

0.0.1 • Public • Published

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);

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i wordnik-as-promised

    Weekly Downloads

    2

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • boodoo