# bottender-botimize

> Middleware for using Botimize with Bottender.

Latest version **0.2.1** (published 2017-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install bottender-botimize
pnpm add bottender-botimize
yarn add bottender-botimize
bun add bottender-botimize
```

## 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 | 2017-12-08 |
| First published | 2017-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.6 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | kpman, xxhomey19, chentsulin |
| Keywords | botimize, bottender |

## Links

- npm: https://www.npmjs.com/package/bottender-botimize
- Repository: https://github.com/bottenderjs/bottender-botimize
- Homepage: https://github.com/bottenderjs/bottender-botimize#readme
- Issues: https://github.com/bottenderjs/bottender-botimize/issues
- npm.io page: https://npm.io/package/bottender-botimize

## Dependencies (1)

- [botimize](https://npm.io/package/botimize.md) ^1.0.2

## Recent versions

- 0.2.1 (latest) — 2017-12-08
- 0.2.0 — 2017-12-07
- 0.1.0 — 2017-12-05

## README

# Bottender Botimize

[![npm](https://img.shields.io/npm/v/bottender-botimize.svg?style=flat-square)](https://www.npmjs.com/package/bottender-botimize)
[![Build Status](https://travis-ci.org/bottenderjs/bottender-botimize.svg?branch=master)](https://travis-ci.org/bottenderjs/bottender-botimize)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> Middleware for using [Botimize](https://www.getbotimize.com/) with
> [Bottender](https://github.com/Yoctol/bottender).

## Installation

```sh
npm install bottender-botimize
```

## Example

```js
const { MessengerBot } = require('bottender');
const { createServer } = require('bottender/express');
const botimizeMiddleware = require('bottender-botimize/express');

const bot = new MessengerBot({
  accessToken: '__FILL_YOUR_TOKEN_HERE__',
  appSecret: '__FILL_YOUR_SECRET_HERE__',
});

bot.onEvent(async context => {
  await context.sendText('Hello World');
});

const server = createServer(bot, {
  verifyToken: '__FILL_YOUR_VERIFY_TOKEN_HERE__',
  webhookMiddleware: botimizeMiddleware(bot, {
    apiKey: '__FILL_YOUR_BOTIMIZE_KEY_HERE__',
    platform: 'facebook',
  }),
});

server.listen(5000, () => {
  console.log('server is running on 5000 port...');
});
```

## Server

Supported servers:

* express
* koa

### [express](https://github.com/expressjs/express)

```js
const botimizeMiddleware = require('bottender-botimize/express');
```

### [koa](https://github.com/koajs/koa)

```js
const botimizeMiddleware = require('bottender-botimize/koa');
```

## Contributing

Pull Requests and issue reports are welcome. You can follow steps below to
submit your pull requests:

Fork, then clone the repo:

```sh
git clone git@github.com:your-username/bottender-botimize.git
```

Install the dependencies:

```sh
cd bottender-botimize
yarn
```

Make sure the tests pass (including eslint, flow checks and jest tests):

```sh
yarn test
```

Make your changes and tests, and make sure the tests pass.

## License

MIT © [Yoctol](https://github.com/bottenderjs/bottender-botimize)

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