ppcf
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Status

Build Status Greenkeeper badge

propublica-campaign-finance-node

Node wrapper for ProPublica campaign finance API.

Getting Started

First request an api key here.

Declare a new instance of the object as follows:

var ppcf = require('ppcf');
 
var p = new ppcf('2016', 'API_KEY_HERE');

All function calls share the name of the API and accept a json object with the field indicated in the brackets of indicated in the API documentation, and return a promise with the result being a json object.

Below is an example of the candidate search function:

p.candidates.search({"candidate":"trump"})
.then((result) => {
    console.log(result);
})

Package Sidebar

Install

npm i ppcf

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

242 kB

Total Files

97

Last publish

Collaborators

  • bhildebrand