alandipert / campfireclient

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

This URL has Read+Write access

alandipert (author)
Thu Sep 25 14:33:31 -0700 2008
commit  aaccae87f85b9a797b62d16fd3da77ea8fdbceb3
tree    1f8ae193be9afa9b15450b65932ad2bf0afe4028
parent  adc2539c3a6ad80266d376d1f613b0dcf1e47df7
name age message
file README Wed Sep 24 18:05:02 -0700 2008 removed TODO [alandipert]
file TODO Wed Sep 24 18:04:02 -0700 2008 made TODO a separate file [alandipert]
file build.xml Thu Sep 25 14:33:31 -0700 2008 removed fluff from build.xml [alandipert]
file client.sh Wed Sep 24 14:44:25 -0700 2008 Further tinkering with sh wrapper [alandipert]
directory etc/ Wed Sep 24 14:44:57 -0700 2008 Removing old stuff [alandipert]
directory lib/ Wed Sep 24 14:44:57 -0700 2008 Removing old stuff [alandipert]
directory src/ Loading commit data...
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?