A Bank wrapper. This will have implementations for Starling, Monzo and potentially Tide. The design of this library is inspired by snoowrap.
Some key design points:
- This wraps the API's exactly as they are
- Data is lazy loaded
- Object orientated design. Functionality is organised by object rather than on core object like most libraries.
The library boils down to usage like:
bank = bankwrapMonzo({oauthtokens});
bank.getPrepaidAccount().getBalance().fetch().then(res => res.balance).then(console.log);
//a shorthand proxy-chains form is available (attempting to access a property automatically issues a .fetch and returns resolved var)
bank.getPrepaidAccount().getBalance().balance.then(console.log);This is still very early development. The Intention is that this will be used by my other inprogress project LibreBank to provide a generic API. Bankwrap is being implemented in order to allow grabbing raw objects if more direct access is required and to simplify the raw logic in the abstraction layer.