Editing Query game API
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | ||
+ | WarLight can provide an xml feed of data about a specific game. This allows for the more technical users to write a program that can analyze information about games. Currently, the feed is only available for finished ladder and tournament games. | ||
There's nothing the feed can see that isn't already available through the game's normal interface. This is just a way to write custom analyzers which allows for a broader analysis across games. | There's nothing the feed can see that isn't already available through the game's normal interface. This is just a way to write custom analyzers which allows for a broader analysis across games. | ||
− | |||
− | |||
==Usage== | ==Usage== | ||
− | To access the data, use a URL like this: | + | To access the data, use a URL like this: http://warlight.net/Feeds/GameFeed.aspx?GameID=1212978 |
− | This will | + | This will present you with a large XML blob describing everything about the game. |
− | + | ==XML Definition== | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* A '''standing''' is the state of the board at any given point in time. This contains one entry per territory that contains the number of armies on that territory, who controls it, and the fog level. | * A '''standing''' is the state of the board at any given point in time. This contains one entry per territory that contains the number of armies on that territory, who controls it, and the fog level. | ||
* A '''turn''' is just a collection of orders. This includes all the orders each player submitted, mixed together in the sequence they played out. | * A '''turn''' is just a collection of orders. This includes all the orders each player submitted, mixed together in the sequence they played out. | ||
* An '''order''' is obviously one order that a player submitted. But it can also include other things, such notifications when a player gets eliminated, or when cards are received, etc. Essentially, this represents what you see in the '''Orders''' panel on the right side of a game when viewing history. | * An '''order''' is obviously one order that a player submitted. But it can also include other things, such notifications when a player gets eliminated, or when cards are received, etc. Essentially, this represents what you see in the '''Orders''' panel on the right side of a game when viewing history. | ||
− | In the | + | In the xml blob, you'll find: |
* The players in the game (their names, color, their state, etc.) | * The players in the game (their names, color, their state, etc.) | ||
* All of the details of the map (it's name, all of its territories and what they connect to, all of its bonuses and what territories are in each bonus) | * All of the details of the map (it's name, all of its territories and what they connect to, all of its bonuses and what territories are in each bonus) | ||
Line 30: | Line 23: | ||
* Turn 0: This is all of the orders that played out on the first turn of the game. | * Turn 0: This is all of the orders that played out on the first turn of the game. | ||
* Standing x/turn x: Standings and turns then alternate for each turn of the game, all the way until the final standing. | * Standing x/turn x: Standings and turns then alternate for each turn of the game, all the way until the final standing. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Getting a list of Game IDs== | ==Getting a list of Game IDs== | ||
− | In order to use the game feed, you'll need to know the game ID. This can be obtained through the graphical | + | In order to use the game feed, you'll need to know the game ID. This can be obtained through the graphical WarLight client by opening up the Settings panel and examining the "Link to Game" field. At the end of this field, you'll see GameID= followed by a number. |
To find game IDs programmatically, you can use the [[Game ID feed API]]. | To find game IDs programmatically, you can use the [[Game ID feed API]]. | ||
Line 60: | Line 32: | ||
==See Also== | ==See Also== | ||
− | * [[ | + | * [[GameID feed API]] |
[[Category:API]] | [[Category:API]] |