kindling

Ruby wrapper for the 37 Signals Campfire API

INSTALL:

[sudo] gem install kindling

Usage

To use the kindling gem you need

  1. Api Token - An authentication token which you’ll find on the “Edit my Campfire account” screen in Campfire (click the “Reveal authentication token for API” link)

  2. Subdomain - The Subdomain name for your campfire account (i.e contrast if your campfire domain is contrast.campfirenow.com)

  3. Room ID - The Room ID of the target room (best to get this from the url ie SUBDOMAIN.campfirenow.com/room/XXXXXX)

campfire = Kindling::Campfire.new(API_TOKEN, SUBDOMAIN)

SSL

If using SSL pass true to the third parameter of the Kindling::Campfire constructor

campfire = Kindling::Campfire.new(API_TOKEN, SUBDOMAIN, true)

Sending messages

campfire.speak(ROOM_ID, ‘my message’)

Message Types

The speak method can take an optional third parameter MessageType

Supported message types are

  • “TextMessage” (default) : A regular chat message

  • “SoundMessage” : plays a sound as determined by the message, which can be either “rimshot”, “crickets”, or “trombone”

  • “TweetMessage” : The message must be Twitter status URL only