WeeWar API Players
Posted by BM5k on February 24, 2008 at 07:48 PM
If you haven’t already, see Part 1
I’ve thrown together a script that requests my player info, and outputs it to the screen. You can see the returned xml data here.
Example Output
About Me
name => BM5k
online => true
id => 10908
My Stats
wins => 9
losses => 4
draws => 1
credits => 103350
points => 1523
Friends
sbowerman, bowerman4875, spacecadetjuno
Games
56945, 56698, 56939, 56992, 57266, 57641, 57639
The API Player Object
The WeeWar API makes the following information available for each player:
| Attributes of user element | ||
|---|---|---|
| name | String | Player’s name |
| id | Integer | Unique ID |
| Sub elements | ||
|---|---|---|
| points | Integer | Score |
| profile | String | URL of profile page |
| profileImage | String | URL of profile image |
| profileText | String | Player’s profile blurb |
| victories | Integer | Number of wins |
| draws | Integer | Number of ties |
| losses | Integer | Number of defeats |
| accountType | String | Pro or basic |
| on | Boolean | Player is online |
| readyToPlay | Boolean | Player is ready to play |
| gamesRunning | Integer | Number of current games |
| lastLogin | DateTime | Last login timestamp |
| basesCaptured | Integer | Number of bases captured across all games |
| creditsSpent | Integer | Total expenditure across all games |
| favoriteUnits | Array of Units | 3 most commonly built units |
| preferredPlayers | Array of Players | This players’ friends |
| preferredBy | Arrayof Players | Players that befriend this player |
| games | Array of Games | List of game ids |
| Units Array | ||
|---|---|---|
| unit | Object | Has code attribute, a string containing the unit name |
| Players Array | ||
|---|---|---|
| player | Object | Has name and id attributes |
| Games Array | ||
|---|---|---|
| game | Object | Contains ID element, the game’s unique id |
Comments
There are 0 comments on this post. Post yours →
Post a comment
Required fields in bold.