splitwise-node-rn
v0.4.5
Published
A javascript wrapper for the Splitwise API
Downloads
9
Readme
splitwise-node-rn
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
- Now you can api away
var splitwiseApi = authApi.getSplitwiseApi(userOAuthToken, userOAuthTokenSecret);