Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

o5r/bankin

Repository files navigation

Bankin'

Unofficial Node.js module for Bankin' Web Services

Codeship npm npm license

Install

npm install bankin --save

Getting started

const Bankin = require('bankin');
const bankin = new Bankin('myClientId', 'myClientSecret');

// create a new user
bankin.users.create('myemail@mail.com', 'PaSsEwOrD123456');

// ---

// forge connect item url and redirect user to it
user.items.connectUrl('408')
  .then((url) => res.redirect(url));

// ---

// auth to existing user
bankin.users.auth('myemail2@mail.com', 'PaSsEwOrD123456')) // login with it
  .then((user) => user.transactions.list({ limit: 1 })) // get last transactions
  .then((transactions) => {
      console.log(transactions.resources)
      /*
        [
          {
            "id": 1000013123932,
            "description": "Prelevement Spotify SA",
            "full_description": "Prlv 1512 Spotify SA",
            "amount": -4.99,
            "date": "2016-04-06",
            "update_date": "2016-04-06T09:19:14Z",
            "is_deleted": false,
            "category": {
              "id": 1,
              "resource_uri": "/v2/categories/1",
              "resource_type": "category"
            },
            "account": {
              "id": 2341498,
              "resource_uri": "/v2/accounts/2341498",
              "resource_type": "account"
            },
            "resource_uri": "/v2/transactions/1000013123932",
            "resource_type": "transaction"
          }
        ]
       */

      return transactions.next(); // Get the next page
    });

Documentations

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published