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

    Install

    npm i node-capitalwords

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar