Skip to content
This repository

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

branch: master

fixed duplicate message problem, with a hack. the underlying problem …

…of hook.js being loaded multiple times still exists.
latest commit 3200be7ac8
alan@ubergibson.com authored
Octocat-spinner-32 etc Removing old stuff
Octocat-spinner-32 lib Removing old stuff
Octocat-spinner-32 src fixed duplicate message problem, with a hack. the underlying problem …
Octocat-spinner-32 README removed TODO
Octocat-spinner-32 TODO made TODO a separate file
Octocat-spinner-32 build.xml removed fluff from build.xml
Octocat-spinner-32 client.sh Further tinkering with sh wrapper
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.