<commit_before># node-nextengine
[![CircleCI](https://circleci.com/gh/Leko/node-nextengine/tree/master.svg?style=svg)](https://circleci.com/gh/Leko/node-nextengine/tree/master)
[![codecov](https://codecov.io/gh/Leko/node-nextengine/branch/master/graph/badge.svg)](https://codecov.io/gh/Leko/node-nextengine)

A Nodejs wrapper for the Next Engine API [http://api.next-e.jp](http://api.next-e.jp)

## Installation

```
npm i -S next-engine
```

## Usage

please read [API Document](http://api.next-e.jp).

## Basic request

```js
const Nextengine = require('next-engine')

const client = new Nextengine({
  clientId: process.env.CLIENT_ID,
  clientSecret: process.env.CLIENT_SECRET,
  accessToken: <PASSWORD>_token,
  refreshToken: <PASSWORD>token,
})

client.request('/api_v1_receiveorder_base/count', {
  'receive_order_shop_id-eq': 1
})
  .then(res => console.log('then:', res.count))
  .catch(e => console.error('catch:', e))
```

## Query utility

```js<commit_msg>docs: Fix missing variable in usage<commit_after># node-nextengine
[![CircleCI](https://circleci.com/gh/Leko/node-nextengine/tree/master.svg?style=svg)](https://circleci.com/gh/Leko/node-nextengine/tree/master)
[![codecov](https://codecov.io/gh/Leko/node-nextengine/branch/master/graph/badge.svg)](https://codecov.io/gh/Leko/node-nextengine)

A Nodejs wrapper for the Next Engine API [http://api.next-e.jp](http://api.next-e.jp)

## Installation

```
npm i -S next-engine
```

## Usage

please read [API Document](http://api.next-e.jp).

## Basic request

```js
const Nextengine = require('next-engine')

const client = new Nextengine({
  clientId: 'XXXXXXXXXX',
  clientSecret: '<KEY>',
  accessToken: '<KEY>',
  refreshToken: '<KEY>'
})

client.request('/api_v1_receiveorder_base/count', {
  'receive_order_shop_id-eq': 1
})
  .then(res => console.log('then:', res.count))
  .catch(e => console.error('catch:', e))
```

## Query utility

```js
{'fraction_non_alphanumeric': 0.196549921589127, 'fraction_numerical': 0.0020909566126502874, 'mean_word_length': 4.871165644171779, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3446955', 'n_tokens_mistral': 736, 'n_tokens_neox': 707, 'n_words': 110}