votesmart-node

A wrapper around the VoteSmart API which returns promises

Usage no npm install needed!

<script type="module">
  import votesmartNode from 'https://cdn.skypack.dev/votesmart-node';
</script>

README

Build Status

votesmart-node

A simple wrapper around the function provided by the VoteSmart API.

As of writing, all of the methods in the API are implemented here and each method returns a promise (bluebird) so that these queries can be chained to form more complex queries not possible with the vanilla API.

Installation:

npm i votesmart-node --save

Use:

var votesmart = require('votesmart-node');

votesmart.State.getStateIDs() -> returns a Promise;

In the near future, I'll add more thorough input validation (currently, it will check that the required args are not nil) as well as implementing a few custom queries that I need.