# botnaut-botservice

> Azure bot service connector for Botnaut framework.

Latest version **0.2.0** (published 2018-02-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install botnaut-botservice
pnpm add botnaut-botservice
yarn add botnaut-botservice
bun add botnaut-botservice
```

## 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.0 |
| Published | 2018-02-06 |
| First published | 2018-01-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Pragonauts |
| Maintainers | pragonauts |

## Links

- npm: https://www.npmjs.com/package/botnaut-botservice
- npm.io page: https://npm.io/package/botnaut-botservice

## Dependencies (3)

- [co](https://npm.io/package/co.md) ^4.6.0
- [request](https://npm.io/package/request.md) ^2.79.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.4

## Recent versions

- 0.2.0 (latest) — 2018-02-06
- 0.1.0 — 2018-01-30

## README

# Azure Bot Service connector for Botnaut

![Botnaut](https://github.com/pragonauts/botnaut/raw/master/doc/logo.png)

## Requirements and installation
  - requires `nodejs` > 6.0

  ```bash
  $ npm i -S botnaut-botservice
  ```

## Connector usage

```javascript
const { Hook, Router, Request } = require('botnaut');
const { createProcessor, createHandler } = require('botnaut/serverlessAWS');
const { createBotServiceConnector } = require('botnaut-botservice');

const options = {
    azure: {
      uri: 'azure-oauth-login-uri',
      grant_type: 'grant-type-here',
      scope: 'token-scope-here',
      client_id: 'azure-client-id (App ID)',
      client_secret: 'azure-client-secret (App Password)',
      welcomeAction: 'welcome-action' // optional postback action to start the conversation
}

const bot = new Router();
const botServiceConnector = createBotServiceConnector(options, Request);

const processor = createProcessor(bot, options});
const hook = new Hook(processor, botServiceConnector);

const handler = createHandler(hook, 'bot-token', console);
```

## Contributing

- Follow [AirBnB style guide](https://github.com/airbnb/javascript)
- Mind the [Gitflow workflow](http://nvie.com/posts/a-successful-git-branching-model/)
- Check ESLint settings in `.eslintrc` and ensure your ESLint is enabled
- (*do the magick*)
- run `npm test` to ensure everything is fine
- create feature branch at your fork and make pull request to upstream (ask App Owner)

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