# asterai-api-bot-writer

> SDK library that provides integration API for AsterAI service.

Latest version **1.0.4** (published 2019-09-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install asterai-api-bot-writer
pnpm add asterai-api-bot-writer
yarn add asterai-api-bot-writer
bun add asterai-api-bot-writer
```

## 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.4 |
| Published | 2019-09-03 |
| First published | 2019-09-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Alexandr Baranezky |
| Maintainers | asterai.com |
| Keywords | asterai, bot-writer, asterai-bot |

## Links

- npm: https://www.npmjs.com/package/asterai-api-bot-writer
- npm.io page: https://npm.io/package/asterai-api-bot-writer

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) 2.6.0

## Recent versions

- 1.0.4 (latest) — 2019-09-03
- 1.0.3 — 2019-09-03
- 1.0.2 — 2019-09-01
- 1.0.1 — 2019-09-01
- 1.0.0 — 2019-09-01

## README

# AsterAI JS library for server side node.js app
Use this library to integrate AsterAI bot writer services.

### 1. Get API HASH code at http://asterai.com/operator/
 
### 2. install lib
    npm  install asterai-api-bot-writer --save 

### 3. Put this demo into your project
```javascript

const  BotWriter  = require( 'asterai-api-bot-writer').BotWriter;

const botWriter = new BotWriter(
  '<API HASH>', // get this API HASH on http://asterai.com/operator/
  'showcase:domestic_chemical_default' // get this System  on bots page at http://asterai.com/operator/
);


// Please use this model for example of data structures that bot understand 
const demoModel = { 
  "name": "Some shampoo",
  "class": "shampoo",

  "brand": "american_crew",
  "model": "Classic",

  "internalID": "6",

  "attributes": [
    {
      "attribute": "consumer:budget",
      "value": "prof"
    },
    {
      "attribute": "volume",
      "value": "1"
    },
    {
      "attribute": "country",
      "value": "usa"
    }
  ]

};

// Send command to bot to  write an article ant get it as result
botWriter.writeArticle(demoModel)
  .then(result => {
      console.log(result);
  })
  .catch(message => {
      console.error('Something goes wrong: ', message);
  });
```

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