Getting RSW turn info and game reports via XML over the web
Posted: Tue Nov 10, 2009 7:07 am
The RSW server has always supported an XML-based backchannel communication, to extract all kinds of information from the game server, including turn due date information and complete turn reports. It is also possible to submit order sheets or messages via this same communication system. In fact, this is exactly the mechanism that the RSW client uses to download turn reports and submit orders; so anything the RSW client can do, you can in principle write your own scripts to do too.
One of our RSW players has written an app that takes advantage of this to report how many players a particular game is still waiting on; see this thread.
In general, you can do this by POSTing an XML-formatted request to the URL address https://rswgame.com/xml . The request format is simple, and looks like this:
<request command="c">
<parameter keyword="k" value="v" />
</request>
where "c" is the particular command to issue, and "k" and "v" are keyword/value pairs to send to the command. The <parameter> element may appear zero or more times, once for each parameter required.
For a list of available commands, and the parameters supported by each, send the command "help", with no parameters.
You can also do this easily from a command line prompt with this Python script (Windows users will need to install Python first to run it): http://rswgame.com/rsw_remote.py, and if you are comfortable reading Python, you can inspect this simple script for more specifics about the URL posting.
The response to your request will be formatted in XML as well. There is little specific documentation on the response format, but it should be apparent by inspection. Please feel free to ask if you have questions.
David
One of our RSW players has written an app that takes advantage of this to report how many players a particular game is still waiting on; see this thread.
In general, you can do this by POSTing an XML-formatted request to the URL address https://rswgame.com/xml . The request format is simple, and looks like this:
<request command="c">
<parameter keyword="k" value="v" />
</request>
where "c" is the particular command to issue, and "k" and "v" are keyword/value pairs to send to the command. The <parameter> element may appear zero or more times, once for each parameter required.
For a list of available commands, and the parameters supported by each, send the command "help", with no parameters.
You can also do this easily from a command line prompt with this Python script (Windows users will need to install Python first to run it): http://rswgame.com/rsw_remote.py, and if you are comfortable reading Python, you can inspect this simple script for more specifics about the URL posting.
The response to your request will be formatted in XML as well. There is little specific documentation on the response format, but it should be apparent by inspection. Please feel free to ask if you have questions.
David