My favorites | Sign in
Project Logo
                
Code license: New BSD License
Labels: java, campfire, api
Show all Featured downloads:
campfireclient-0.1.zip
Feeds:
People details
Project owners:
  alan.dipert

THE STUFF HERE IS DEPRECATED

This project has been moved to Github

The stuff here is no longer maintained. Thanks!

campfireclient: Java API for Campfire

This is a very early release of an API for connecting to Campfire chats in Java. Ultimately, this might be the foundation for a program that translates IRC into Campfire API calls, so you can have eggdrop in your Campfire, or connect with a 3rd party client that supports IRC. Or Jabber. Or Oscar? In any case, Campfire needs to be opened up.

API example

    ConsoleClient cc = new ConsoleClient(user, pass, subdomain, false);
    cc.joinRoom("Bots");
    cc.sendMessage("sup");

    while(!cc.lastMessage.matches(".*go.*away.*robot.*")) {
      //chill in the room
    }   

    cc.leaveCurrentRoom();
    cc.logOut();

Install

  1. Download http://campfireclient.googlecode.com/files/campfireclient-0.1.zip
  2. Install HtmlUnit
  3. Install gnu.getopt.Getopt
  4. Sort out your classpath (HtmlUnit has lots of dependencies)
  5. Profit!

Goals

Eventually, this thing should be able to do everything a client in a normal web browser is able to do.

Project Status

There's not much to it now. Features it has so far:

Needless to say there's a ways to go. Ultimately, this would be awesome as the foundation of an IRC proxy for Campfire, allowing the use of IRC bots in Campfire rooms.

Developers

It's based on HtmlUnit, a web-app unit testing tool that has an awesome browser emulator. It's really a glorified screenscraper using HtmlUnit and a little bit of injected Javascript.

I've put together a brainstorming document with a list of potential classes and a basic program flow.

Let me know if you want to be a part of this project! The idea of being able to connect to Campfire on Adium/Pidgin over a Campfire IRC proxy/translator is pretty awesome :)









Hosted by Google Code