bankson-js Node client


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Nov 1, 2018May 26, 2016Minified + gzip package size for bankson-js in KB

Readme Node.JS client

API documentation: Official documentation


npm install --save bankson-js


import Client from 'bankson-js';
var client = new Client({
  bearerToken: bearerTokenObtainedWithOAuth2
}); => {
  console.log('Current user', resp.user);

Dynamic bearer token

Because of the expiring nature of bearer tokens you can validate and refresh them before every request by providing a beforeRequest function that returns a promise:

import Client from 'bankson-js';
var client = new Client({
  beforeRequest: () => {
    return refreshMyToken().then(token => {
      return {
        bearerToken: token

Test mode

To support API requests in test mode, you can either specify test: true in the constructor options or return test: true in the promised value in beforeRequest.


MIT License

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from