Ladder API

This may sound silly but we don’t have an effective way of sharing our ladder information for Guild Wars. I’ve just put together a really simple Guild Wars Ladder API which will allow users to hopefully grab data from (initially) the Hero and Guild ladders. When the ladders were written there really wasn’t a push to make them available as feeds (XML) so I just put them together as static data display.

It won’t be live for a few more weeks and my initial release will be soft but basically the ladder pages will accept certain GET parameters. For example:

?format=xml&type=guild_ladder&limit=1&name=Rebel Rising

This will output:

<?xml version="1.0" encoding="UTF-8"?>
		<Name>Rebel Rising</Name>

The database layer has a couple cool formatting functions I’ve extended into it that will return data in XML, JSON, and serialized PHP formats. The json_encode() function isn’t available on our servers yet so the PHP website had a few helpful contributed suggestions on how to handle that. I plan on making sending callback functions a possibility.

On the back end I’ve got a memcache cluster that saves generated datasets to reduce load on the servers and the database. It’s hard to plan for the load on this but after seeing a few folks out there parsing the darn HTML I bet this will be fun to work with. The output formats, especially the JSON, will make integrating with things like YUI and JQuery a breeze.

This entry was posted in Uncategorized. Bookmark the permalink.

Comments are closed.