splitwise-node

0.3.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i splitwise-node

Weekly Downloads

0

Version

0.3.3

License

MIT

Last publish

Collaborators

  • dean177