Folkert Hielema has implemented the complete
Jaiku API for SWX.
You can find the full list of methods and test out the SWX Jaiku API from the SWX Service Browser.
All methods in the official Jaiku API are supported:
- contactsStream
- currentPresence
- lastIndividualStreamEntry
- lastStreamEntry
- publicStream
- sendPresence
- userInformation
- userStream
Feel free to use the SWX Jaiku API from the public SWX gateway in your own applications.
Many thanks to Folkert for implementing this API and sharing it with us all.
Folkert has created a SWX API for Numpa. Numpa is like Twitter, but in Netherlands (Dutch).
The Numpa API is now also hosted on the public SWX gateway so you can explore it online and use it in your own applications without writing any server-side code yourself.
As of the upcoming SWX PHP Release Candidate 1, a full implementation of the Flickr API is included in SWX PHP.
You can start playing with the SWX Flickr API right now, using the Public SWX RPC gateway. Try the methods out online using the SWX Service Explorer.
- Implements the full Flickr API, current as of August 1, 2007.
- Liberal open source license (MIT).
- Provides photo upload feature.
- Actively maintained and updated.
- Simplest way for Flash developers to work with Flickr.
You can use the SWX Service Explorer to explore server-side services on your development machine.
Use the SWX Service Explorer on the SWX Public Gateway to explore the publicly-available SWX APIs on swxformat.org. You can call these APIs directly from Flash without writing any server-side code or hosting your own SWX RPC gateway.
There is a public gateway that you can use on swxformat.org to call the various SWX APIs without hosting your own PHP installation of SWX.
Take a look at the Start Page for the SWX public gateway. This is the same Start Page that you will see when you install SWX PHP or the SWX PHP MAMP Bundle (only it's called start.php instead of index.php here on swxformat.org).
The URL for the public gateway is:
http://swxformat.org/php/swx.php/
You are encouraged to make use of the SWX public gateway but please do not flood it with so many requests that it resembles a denial of service attack!
The public gateway also hosts versions of the SWX Service Explorer and SWX Data Analyzer.
SWX is so simple that instructions for getting data into Flash using it easily fit on to a Moo card (ask me for one if you see me around!)
To get a list of the most recent 100 photos from Flickr into Flash, do the following:
- Open up the SWX Data Analyzer
- In Flash, create a new FLA and create a movie clip on the Stage. Give it the instance name
loader.
- Write the following code on to the frame that the
loader movie clip is on:
loader.serviceClass = "Flickr";
loader.method = "swxPhotosGetRecent";
loader.debug = true;
loader.loadMovie("http://swxformat.org/php/swx.php", "GET");
That’s it! Test your movie and look in the SWX Data Analyzer to see the results being loaded in to Flash from Flickr. That’s how simple SWX is.
If you want to display the results from within Flash, create a long, single-line dynamic text field on stage and give it the instance name status. Add the following code to the timeline:
function onEnterFrame()
{
status.text = loader.result.photo[0].src;
}
Initially, the status text field will display undefined until the data is loaded and then it will display the URL of the first photo from the list of recent photos that is loaded from Flickr. Notice how you can access the results as native Flash objects the moment they’re loaded. No deserialization or massaging of the data is necessary!
In this example, you used the SWX Public Gateway (http://swxformat.org/php/swx.php) which you're welcome to use in your own applications to create mashups with the supported APIs (Flickr, Twitter, etc.) without having to host or write any back-end code yourself.