title | layout | permalink |
---|---|---|
Campfire adapter |
layouts/docs.html |
/adapters/campfire.html |
Campfire is a web based chat application built by 37signals. The Campfire adapter is one of the original adapters in Hubot.
You will need a Campfire account to start.
Next, you will need to create a user on your Campfire account for your Hubot, then give it access so it can join to your rooms. You will need to create a room if you haven't already.
Hubot defaults to using its Shell, so to use Campfire instead, you can run hubot with -a Campfire
:
% bin/hubot -a campfire
If you are deploying to Heroku or using foreman, you need to make sure the hubot is called with -a Campfire
in the Procfile
:
web: bin/hubot -a campfire -n Hubot
The adapter requires the following environment variables.
HUBOT_CAMPFIRE_ACCOUNT
HUBOT_CAMPFIRE_TOKEN
HUBOT_CAMPFIRE_ROOMS
This can be found by logging in with your hubot's account click the My Info link and make a note of the API token.
If you join the rooms you want your hubot to join will see notice a numerical ID for the room in the URL. Make a note of each ID for the rooms you want your hubot to join.
This is simply the first part of the domain you visit for your Campfire
account. For example if your Campfire was at hubot.campfirenow.com
your
subdomain is hubot
. Make a note of the subdomain.
% heroku config:set HUBOT_CAMPFIRE_TOKEN="..."
% heroku config:set HUBOT_CAMPFIRE_ROOMS="123,321"
% heroku config:set HUBOT_CAMPFIRE_ACCOUNT="..."
% export HUBOT_CAMPFIRE_TOKEN="..."
% export HUBOT_CAMPFIRE_ROOMS="123,321"
% export HUBOT_CAMPFIRE_ACCOUNT="..."
Using PowerShell:
setx HUBOT_CAMPFIRE_TOKEN "..." /m
setx HUBOT_CAMPFIRE_ROOMS "123,321" /m
setx HUBOT_CAMPFIRE_ACCOUNT "..." /m