# wit-keywords

> Mass push values to keyword based entities on Wit.ai

Latest version **1.0.0** (published 2017-02-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install wit-keywords
pnpm add wit-keywords
yarn add wit-keywords
bun add wit-keywords
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-02-23 |
| First published | 2017-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel Eckermann |
| Maintainers | ecrmnn |

## Links

- npm: https://www.npmjs.com/package/wit-keywords
- Repository: https://github.com/ecrmnn/wit-keywords
- Issues: https://github.com/ecrmnn/wit-keywords/issues
- npm.io page: https://npm.io/package/wit-keywords

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.15.3

## Recent versions

- 1.0.0 (latest) — 2017-02-23

## README

# wit-keywords
> Mass push values to keyword based entities on Wit.ai

[![Travis](https://img.shields.io/travis/ecrmnn/wit-keywords.svg?style=flat-square)](https://travis-ci.org/ecrmnn/wit-keywords.svg?branch=master)
[![npm version](https://img.shields.io/npm/v/wit-keywords.svg?style=flat-square)](http://badge.fury.io/js/wit-keywords)
[![npm downloads](https://img.shields.io/npm/dm/wit-keywords.svg?style=flat-square)](http://badge.fury.io/js/wit-keywords)
[![npm license](https://img.shields.io/npm/l/wit-keywords.svg?style=flat-square)](http://badge.fury.io/js/wit-keywords)

### Installation
```bash
npm install wit-keywords --save
```

### Usage
Push an array of actors to the actor entity
```javascript
const keywords = require('wit-keywords');

new keywords(process.env.WIT_TOKEN)
  .entity('actor')
  .push([
    'Leonardo DiCaprio',
    'Steve Carell',
    'Alec Baldwin',
    'Micheal Cera'
  ])
  .then(response => console.log(response))
  .catch(err => console.log(err));

//=> [{
//=>   value: 'Leonardo DiCaprio',
//=>   status: 'added'
//=> }, {}, {}, {}]
```

Trigger a function ``after`` each pushed item
```javascript
const keywords = require('wit-keywords');

new keywords(process.env.WIT_TOKEN)
 .entity('actor')
 .after(actor => {
   // Do something
 })
 .push([
   'Leonardo DiCaprio',
   'Steve Carell',
   'Alec Baldwin',
   'Micheal Cera'
 ]);
```

Trigger a function ``after`` each pushed item
```javascript
const keywords = require('wit-keywords');

new keywords(process.env.WIT_TOKEN)
  .entity('actor')
  .after(actor => {
    // Do something
  })
  .push([
    'Leonardo DiCaprio',
    'Steve Carell',
    'Alec Baldwin',
    'Micheal Cera'
  ]);
```

Set custom number of parallel requests (``concurrency``)
```javascript
const keywords = require('wit-keywords');

new keywords(process.env.WIT_TOKEN)
  .concurrency(4) // Default = 3
  .entity('actor')
  .after(actor => {
    // Do something
  })
  .push([
    'Leonardo DiCaprio',
    'Steve Carell',
    'Alec Baldwin',
    'Micheal Cera'
  ]);
```

### License
MIT © [Daniel Eckermann](http://danieleckermann.com)

---
_Source: https://npm.io/package/wit-keywords · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
