# @napoai/cloud

> The NodeJS SDK for the Napo Cloud API.

Latest version **0.2.1** (published 2019-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @napoai/cloud
pnpm add @napoai/cloud
yarn add @napoai/cloud
bun add @napoai/cloud
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2019-09-06 |
| First published | 2019-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 10 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Zammmit |
| Maintainers | jameszammit |
| Keywords | napo, napo cloud, napo sdk, napo cloud sdk |

## Links

- npm: https://www.npmjs.com/package/@napoai/cloud
- Repository: git@gitlab.napo.engineering:napo-cloud/services/cloud-sdk/nodejs-client
- Homepage: https://cloud.napo.ai
- Issues: https://gitlab.napo.engineering/napo-cloud/services/cloud-sdk/nodejs-client
- npm.io page: https://npm.io/package/@napoai/cloud

## Dependencies (10)

- [archiver](https://npm.io/package/archiver.md) ^3.1.1
- [make-dir](https://npm.io/package/make-dir.md) ^3.0.0
- [directory](https://npm.io/package/directory.md) ^0.1.0
- [file-base64](https://npm.io/package/file-base64.md) ^1.0.0
- [app-root-path](https://npm.io/package/app-root-path.md) ^2.2.1
- [nodejs-base64](https://npm.io/package/nodejs-base64.md) ^1.0.3
- [delete-directory](https://npm.io/package/delete-directory.md) ^1.0.0
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^2.2.0
- [@feathersjs/client](https://npm.io/package/@feathersjs/client.md) 4.3.0
- [localstorage-memory](https://npm.io/package/localstorage-memory.md) ^1.0.3

## Recent versions

- 0.2.1 (latest) — 2019-09-06
- 0.2.0 — 2019-08-17
- 0.1.8 — 2019-08-08
- 0.1.7 — 2019-08-08
- 0.1.4 — 2019-06-25
- 0.1.3 — 2019-06-25
- 0.1.2 — 2019-06-25
- 0.1.1 — 2019-06-19

## README

# @napoai/cloud


## Installation

```
npm install @napoai/cloud --save
```

## Quick example

```js
const cloud = require('@napoai/cloud');

// Initiliase with cloud keys
await cloud.init('./PATH_TO_SERVICE_ACCOUNT');

let project = cloud.project('YOUR_PROJECT_ID');
let chat = project.chatEngine();

chat.handleMessage({
  text: 'hello',
  sender: 'default'
}).then(reply => {
  // Reply
  // Hi! How are you doing?
});

chat.train({
  data: './PATH_TO_TRAINING_DATA',
  version: '1.0'
}).then(result => {
  console.log(result);
});

chat.getStatus().then(status => {
  // Status
})

chat.setActionsEndpoint('ACTIONS_ENDPOINT').then(result => {
  // 200 - Success
});
```

## Documentation

Please refer to the [@napoai/admin documentation](https://docs.cloud.napo.ai) for more details.

## License

Copyright (c) 2019

Licensed under the [MIT license](LICENSE).

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