node-capitalwords

1.0.0 • Public • Published

Sunlight Foundation Capital Words API Wrapper

A node.js wrapper around the Sunlight Foundation's Capital Words API that utilizes promises for easy chaining and asynchronous code.

Installing

npm install node-capitalwords

Configuration

You will need a Sunlight Foundation API key to use the underlying API. This can be obtained here.

Usage

const CapitalWords = require('./capitalwords');

const capitalWords = new CapitalWords('yourAPIKey');

capitalWords.dates({ phrase: 'Sunlight Foundation' })
	.then(function(response) {
		console.log(response);
	})
	.catch(function(errorText) {
		console.log('Error: ', errorText);
	});

Check out the included examples.js for more examples

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    11

Package Sidebar

Install

npm i node-capitalwords

Weekly Downloads

11

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tcamara