splitwise-node

v0.3.3
A javascript wrapper for the Splitwise API
Splitwise

splitwise-node

Circle CI

A javascript wrapper for the Splitwise API.

Install with npm

npm install splitwise-node

Usage

  • Get your ConsumerToken and ConsumerSecret from Splitwise
  • Get an authorization url to send your user to:
var AuthApi = require('splitwise-node');

var userOAuthToken, userOAuthTokenSecret;
var authApi = new AuthApi(ConsumerKey, ConsumerSecret);
var userAuthUrl = authApi.getOAuthRequestToken()
    .then(({ oAuthToken, oAuthTokenSecret }) => {
        [userOAuthToken, userOAuthTokenSecret] = [oAuthToken, oAuthTokenSecret];
        return api.getUserAuthorisationUrl(oAuthToken);
    });
  • Get your user to authorize your token by visiting the authorization url User authorization screenshot
  • Now you can api away
var splitwiseApi = authApi.getSplitwiseApi(userOAuthToken, userOAuthTokenSecret);

License

MIT

npm i splitwise-node

Metadata

  • MIT
  • Whatever
  • Dean Merchant
  • released 1/30/2016

Downloads

Maintainers