Skip to content
This repository

Java API and command-line client for Campfire, the 37Signals chat application.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 etc
Octocat-spinner-32 lib
Octocat-spinner-32 src
Octocat-spinner-32 README
Octocat-spinner-32 TODO
Octocat-spinner-32 build.xml
Octocat-spinner-32 client.sh
README
----------------------------------------------------
campfireclient-0.1dev
Java API for connecting to Campfire,
Command-line client using the API 
----------------------------------------------------
QUICKSTART
----------------------------------------------------
1. ant jar
2. ./client.sh -u user@example.com -p pass -s subdomain [-S use SSL]
3. Presto!

----------------------------------------------------
REQUIREMENTS
----------------------------------------------------
Java 1.5+
Ant 1.7+
HtmlUnit and its dependencies are packaged up in /lib.

----------------------------------------------------
OVERVIEW
----------------------------------------------------
This package provides:

- org.ubergibson.campfireclient.CampfireClient

  Connects to a Campfire server, and provides
  methods for doing things like joining rooms, collecting
  messages, and speaking.

- org.ubergibson.campfireclient.ConsoleClient

  Simple command-line Campfire client; extends CampfireClient
  and shows how one might use the API to create a new client.

----------------------------------------------------
TECHNICAL
----------------------------------------------------
This package depends heavily on HtmlUnit and its multitude
of sub-dependencies; it works by emulating a browser,
scraping things from the DOM.  ConsoleClient uses gnu's Java
getOpt to parse command-line options.

It collects new messages by adding a hook into
Campfire.Responders, which dispatches alerts().  HtmlUnit
provides a mechanism for handling alert events, and the
client's ability to receive new messages is built on this.

The class tree is more or less built out, but little
actually functions.  Advanced things like being in multiple
rooms, receiving notifications about comings and goings of
people in the room, and changing user settings, have yet to
be implemented.  But it all kinda works :)


----------------------------------------------------
BUGS
----------------------------------------------------
There are a lot.  A big one right now is duplicate messages
showing up and being printed.  Maybe CampfireClient could
store the ID of the latest message, and compare it against any
new ones before it notifies the MessageHandler?
Something went wrong with that request. Please try again.