2.0.2 • Published 6 years ago

easybill-node-api v2.0.2

Weekly downloads
33
License
MIT
Repository
github
Last release
6 years ago

easybill node api

Usage

const Promise = require('bluebird');

const easybill = require('easybill-node-api')('your-easybill-token');

easybill.get('documents')
  .then((res) => console.log(res.items));

// Since this module uses Bluebird, this is also possible:

easybill.get('customers')
  .then(({items}) => items)
  .mapSeries(async (customer) => {
    const res = await easybill.get(`documents?customer_id=${customer.id}`);
    return {
      customer,
      documents: res.items
    };
  }
  .each(({customer, documents}) =>
    console.log(`Customer ${customer.id} has ${documets.length} documents`);
  );
2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago