Skip to content

Dean177/splitwise-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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(({ token, secret }) => {
        [userOAuthToken, userOAuthTokenSecret] = [token, secret];
        return api.getUserAuthorisationUrl(token);
    });
  • 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

About

A javascript wrapper for the Splitwise API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •