node-tide
A Node module to assist with connections to the Tide business banking API
Installation
$ npm install --save node-tide
Quick Usage Guide
Below is a quick guide to using the node-tide module, you can see full information in the documentation. There is also a quick example application available showing full integration with expressJs.
Getting the Authentication URL
You can easily get the URL required to authenticate against the Tide OAuth2 API.
Javascript
var nodeTide = ; // Create a new Tide applicationvar tide = ; // Generate the OAuth2 URL the user needs to authenticatevar authenticationUrl = nodeTideauth; console;
Typescript
; // Create a new Tide application; // Generate the OAuth2 URL the user needs to authenticate; console.logauthenticationUrl;
Pulling a list of companies
Once you have authenticated you can then pull a list of companies for the user.
Javascript
var nodeTide = ;var accessToken = "my4cc35570k3n"; // From authentication // Create a new Tide applicationvar tide = accessToken; // Gets a list of companiestidecompaniesall
Typescript
;; // From authentication // Create a new Tide application; // Gets a list of companiesthis.companies.all .then
Pulling a list of accounts
Once you have a company ID you can then pull a list of accounts associated wtih a company.
Javascript
var nodeTide = ;var accessToken = "my4cc35570k3n"; // From authenticationvar companyId = 182736; // From the company list // Create a new Tide applicationvar tide = accessToken; // Gets a list of accountstideaccountsallcompanyId
Typescript
;; // From authentication; // From the company list // Create a new Tide application; // Gets a list of accountsthis.accounts.allcompanyId .then
Pulling a list of transactions
Once you have an account ID you can then pull a list of transactions from an account.
Javascript
var nodeTide = ;var accessToken = "my4cc35570k3n"; // From authenticationvar accountId = 60192; // From the company list // Create a new Tide applicationvar tide = accessToken; // Gets a list of accountstidetransactionsallaccountId
Typescript
;; // From authentication; // From the company list // Create a new Tide application; // Gets a list of accountsthis.transactions.allaccountId .then
It is also possible to filter transactions by reference using this.transactions.findReference(accountId, 'My Reference')
and also by date range using this.transactions.findDateRange(accountId, moment().subtract(2, 'days'))
License
MIT © Simon Skinner