# Striven Report Builder

> A Node.js client to handle your Striven Reports

## Getting Started

```sh
$ npm install @striven-erp/reportbuilder-js
```

```js
const reportbuilder = require('@striven-erp/reportbuilder-js');

const REPORT = 'https://api.test.striven.com/v2/custom-report/ea014330b4654400a9bd2b94fbf70e583def90e78f6647d483c6a817892ca0bf';

async function start() {
  const customers = await reportbuilder(REPORT);

  console.log(customers.getData());
}

start();
```

## Methods

|Method|Returns|Description|
|:-:|:-:|:-:|
|getData|```Array```|Returns an array of the report data|
|toJson(```String```)|```String```|Create a file at the path parameter and returns the path to the file|
|map|```Function```|Maps over the report data <br /> [JavaScript Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)|
