WeeWar API HQ
Posted by BM5k on February 24, 2008 at 10:36 PM
If you haven’t already, see parts 1, 2 and 3
This script checks your HQ and prints out a list of games. You can see the returned xml data here.
Example Output
Active Games
One if by land
Someone else’s turn for the last 2 hours
It’s been brought
Someone else’s turn for the last 8 hours 12 Minutes
WAR 2
Someone else’s turn for the last 10 Minutes
Go Baby Go
Someone else’s turn for the last 1 hours 35 Minutes
Lobby
Moo, This Means War
The HQ Object
The HQ API request actually returns an array of games, appropriately as sub elements of game. If a game is waiting for you, it will have a boolean inNeedOfAttention attribute set to true.
| Games Objects | ||
|---|---|---|
| id | Integer | Unique game identifier |
| name | string | The name of the game |
| state | String | Text status info |
| since | String | Duration of current turn |
| link | String | URL of game page |
The only other element of games is inNeedOfAttention an integer specifying how many of your games are waiting on you. Annoyingly, this includes games that haven’t started yet.
Comments
There are 0 comments on this post. Post yours →
Post a comment
Required fields in bold.