hubot-bearychat
Advanced tools
Comparing version 0.2.4 to 0.3.0
{ | ||
"name": "hubot-bearychat", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"description": "BearyChat adapter for hubot", | ||
@@ -12,3 +12,2 @@ "main": "./src/bearychat", | ||
"author": "BearyInnovative Technologies, Inc.", | ||
"license": "EPL-1.0", | ||
"repository": { | ||
@@ -21,3 +20,6 @@ "type": "git", | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"bearychat": "^0.1.0", | ||
"ws": "^1.1.1" | ||
}, | ||
"peerDependencies": { | ||
@@ -29,4 +31,11 @@ "hubot": ">=2.0" | ||
}, | ||
"scripts": { | ||
"build-doc": "markdown-toc -i README.md && markdown-toc -i README_CN.md" | ||
}, | ||
"license": "MIT", | ||
"contributors": [ | ||
{ | ||
"name": "hbc" | ||
}, | ||
{ | ||
"name": "yuanbohan", | ||
@@ -33,0 +42,0 @@ "email": "yuanbo.han@bearyinnovative.com", |
@@ -5,4 +5,32 @@ # hubot-bearychat | ||
#### Creating a new bot | ||
![Development Status](https://img.shields.io/badge/status-0.3.0-green.svg?style=flat-square) | ||
[中文文档](./README_CN.md) | ||
<!-- toc --> | ||
- [5 Minutes Setup](#5-minutes-setup) | ||
* [Step 1. get ya a "hubot token"](#step-1-get-ya-a-hubot-token) | ||
* [Step 2. bootstrap your secret hubot project with yeoman](#step-2-bootstrap-your-secret-hubot-project-with-yeoman) | ||
* [Step 3. copy your hubot token and start it](#step-3-copy-your-hubot-token-and-start-it) | ||
* [Step 4. start chatting with your bot!](#step-4-start-chatting-with-your-bot) | ||
- [Mode](#mode) | ||
* [RTM mode](#rtm-mode) | ||
* [HTTP mode](#http-mode) | ||
- [Configuration](#configuration) | ||
- [LICENSE](#license) | ||
<!-- tocstop --> | ||
## 5 Minutes Setup | ||
### Step 1. get ya a "hubot token" | ||
Go to your team robots page in bearychat.com (your-cool-team.bearychat.com/robots) | ||
and create a hubot. You will get your hubot token inside the bot settings form: | ||
![art/create_hubot.png](art/create_hubot.png) | ||
### Step 2. bootstrap your secret hubot project with yeoman | ||
- `npm install -g hubot coffee-script yo generator-hubot` | ||
@@ -13,16 +41,53 @@ - `mkdir -p /path/to/hubot` | ||
- `npm install hubot-bearychat --save` | ||
- Check out the [hubot docs](https://github.com/github/hubot/tree/master/docs) for further guidance on how to build your bot | ||
#### Testing your bot locally | ||
Also check out the [hubot docs](https://github.com/github/hubot/tree/master/docs) | ||
for further guidance on how to build your bot. | ||
- `HUBOT_BEARYCHAT_TOKENS=TOKEN1,TOKEN2 ./bin/hubot -a bearychat` | ||
### Step 3. copy your hubot token and start it | ||
```shell | ||
$ export HUBOT_BEARYCHAT_TOKENS=token-token-token-here | ||
$ export HUBOT_BEARYCHAT_MODE=rtm | ||
$ ./bin/hubot -a bearychat | ||
``` | ||
### Step 4. start chatting with your bot! | ||
![art/bot_chat.png](art/bot_chat.png) | ||
You can also refer [example/](example) for sample setup. | ||
## Mode | ||
### RTM mode | ||
RTM mode uses BearyChat's RTM api and WebSocket as message transport protocol. | ||
In this mode, hubot can receive all messages in real time and hear any messages | ||
from channels it had joined. | ||
To enable RTM mode, you should specify environment variable | ||
`HUBOT_BEARYCHAT_MODE=rtm` before running the hubot. | ||
`hubot-bearychat` uses rtm mode by default. | ||
### HTTP mode | ||
HTTP mode is the legacy message transport protocol. In this mode, hubot can | ||
only receive messages that himself was mentioned (e.g. `@hubot how do you do`), | ||
and you need to set the hubot hosted http service url in the hubot settings form. | ||
To enable HTTP mode, you should specify environment variable | ||
`HUBOT_BEARYCHAT_MODE=http` before running the hubot. | ||
## Configuration | ||
This adapter uses the following environment variables: | ||
Available configurations are injected via environment variables: | ||
- `HUBOT_BEARYCHAT_TOKENS` - these are hubot tokens in BearyChat, multi tokens are separated by comma | ||
| envvar | description | | ||
|:------:|:------------| | ||
| `HUBOT_BEARYCHAT_MODE` | running mode for the hubot, by default is `rtm` | | ||
| `HUBOT_BEARYCHAT_TOKENS` | hubot token, required for running hubot | | ||
## Copyright | ||
## LICENSE | ||
Copyright © Beary Innovative Technologies, Inc. | ||
MIT |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
228761
14
0
100
92
3
2
+ Addedbearychat@^0.1.0
+ Addedws@^1.1.1
+ Addedbabel-plugin-add-module-exports@0.2.1(transitive)
+ Addedbearychat@0.1.0(transitive)
+ Addedencoding@0.1.13(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisomorphic-fetch@2.2.1(transitive)
+ Addednode-fetch@1.7.3(transitive)
+ Addedoptions@0.0.6(transitive)
+ Addedultron@1.0.2(transitive)
+ Addedurijs@1.19.11(transitive)
+ Addedwhatwg-fetch@3.6.20(transitive)
+ Addedws@1.1.5(transitive)