class.jaiku.php is an PHP5 class that allows for basic interaction with Jaiku. At present the useful functionality is limited to updating your Jaiku presence, and grabbing the current presence message and location for a given Jaiku user (you or someone else).
Jaiku's API is new and is expected to grow in richness; I'll try to evolve this class as this happens.
You can browse the source code from a browser, or grab the latest version of the source code using Subversion at:
You can grab the latest version of the source code using Subversion at:
The only additional code required is XMLParser, required to parse the XML presence information returned by Jaiku. This requirement may eventually be eliminated.
Your username and personal_key are required to use the API.
Your username is your regular Jaiku username.
Your personal_key can be obtained by first signing in to Jaiku and then visiting http://api.jaiku.com.
require_once("class.jaiku.php"); $j = new Jaiku("username","personal_key"); $j->UpdatePresence("Hey, I'm using class.jaiku.php!",'Berlin, Germany', 329); $p = $j->GetPresence(); print_r($p);
This code should update your Jaiku presence, location and icon and then query Jaiku to retrieve this information and display it.
There's no error reporting at all, so if it fails, you'll never know.
2007-04-28 - v0.15
2006-01-19 - v0.13
2006-12-24 - v0.12
- The class now uses the burgeoning Jaiku API to send a presence update if you create the Jaiku object with a developer key (if you don't pass a key, the old school method is used).
- References to jaikuname have been changed to screenname for consistency with the website terminology.
- The GetJaikuSession function is now called automatically by UpdatePresence.
2006-12-24 - v0.11
2006-12-23 - v0.10
2006-12-22 - v0.8
- Incorporated a patch from Andy Smith to handle new Jaiku security features (have to retrieve and send back a value for '_nonce').