<commit_before># Campfire plugin for CakePHP 1.3+

Provides functionality related to 37signal's [Campfire](http://campfirenow.com/) application.

## Installation

* Download the plugin

        $ cd /path/to/your/app/plugins && git clone git://github.com/joebeeson/campfire.git

* Add the component to your `$components` and configure it there

            var $components = array(
                'Campfire' => array(
                    'auth' => 'TrLaTiehOeTiAhieP8iedoUPiaSO5SoExl9spius',
                    'account' => 'acmecorp'
                )
            );
<commit_msg>Updating the README to be more useful<commit_after># Campfire plugin for CakePHP 1.3+

Provides functionality related to 37signal's [Campfire](http://campfirenow.com/) application.

## Installation

* Download the plugin

        $ cd /path/to/your/app/plugins && git clone git://github.com/joebeeson/campfire.git

* Add the component to your `$components` and configure it there

            var $components = array(
                'Campfire' => array(
                    'auth' => 'TrLaTiehOeTiAhieP8iedoUPiaSO5SoExl9spius',
                    'account' => 'acmecorp'
                )
            );

## Methods

To retrieve a list of rooms that the authenticated user has access to, you can use the `getRooms` method.

			$rooms = $this->Campfire->getRooms();

Getting the ID for a room is also pretty simple and takes the room's name.

			$roomId = $this->Campfire->getRoomId('Room name');

To get specific details about a room use the `getRoomDetails` method which accepts either the room ID or name.

			$roomDetails = $this->Campfire->getRoomDetails('Room name');

			// Or, alternatively use the ID
			$roomDetails = $this->Campfire->getRoomDetails(28261);

Sending a message takes the room ID (or name) and the message you wish to send.

			$this->Campfire->sendMessage($roomId, 'Why hello there!');

## Example

Here's an example to send a message to all rooms that the user has access to.

			foreach ($this->Campfire->getRooms() as $room) {
				extract($room);
				$this->Campfire->sendMessage($id, 'Hello there! This is room #' . $id);
			}
{'fraction_non_alphanumeric': 0.11033193080878916, 'fraction_numerical': 0.008882655446470314, 'mean_word_length': 2.8214285714285716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5571517', 'n_tokens_mistral': 689, 'n_tokens_neox': 624, 'n_words': 206}