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:
This will output:
<?xml version="1.0" encoding="UTF-8"?> <dataSet> <data> <BatchId>199225</BatchId> <Rank>3</Rank> <WorldRank>3</WorldRank> <Name>Rebel Rising</Name> <Tag>rawr</Tag> <Territory>America</Territory> <Rating>1676</Rating> <Wins>85</Wins> <Losses>9</Losses> <QPoints>0</QPoints> <PeakWorldRank>1</PeakWorldRank> <MinSinceLastMatch>59994</MinSinceLastMatch> </data> </dataSet>
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.