I read a post that was from a while back, c. 2011. It had brought up the site's API which was responded to with, " It's not yet public, but it will be ". I haven't been able to find any more information on the matter. I was just wondering if the site truly had a Public API now, and where I could find it if so.
TL;DR: Does Wargear have a public API, and where can I find it?
Damn that search function!
There is a REST API but it's not Public yet - but only in the sense that it's not been documented. I've been looking at a tool for auto-documenting this.
What sort of thing are you interested in it for?
what is API and why do we care?
Tom, Thank you for replying!
I am just looking to create a sort of auto informer that can report to an IRC channel, or skype room or something.
I know the site has a lot of options to remind people it's their turn, but it requires either getting a lot of emails, or being constantly logged into the site. As this can't always be done, I was just looking for a way to inform my friends on a turn by turn basis who's turn it is.
Fairly simple, but I am in no means in a giant rush to get it all sorted out, just the boredom kicking in, looking to entertain myself :)
Thank you for the reply!
An API is an "Applications Programming Interface". It's a way for other programs to interact with wargear. The API defines what functionality WarGear exposes to the outside world.
I also would be interested in an API. From a map makers perspective I would find it extremely useful to be able to query wargear about the history of public games played on my maps. I can think of tons of custom statistics that I would like to compile to help me make my maps more fun and more balanced.
If the API did allow me to do that, I would try and make a public front end to whatever tools I create to allow other mapmakers to also benefit.
Ozyman wrote:If the API did allow me to do that, I would try and make a public front end to whatever tools I create to allow other mapmakers to also benefit.
I have no clue what it all means, but I'm gonna give it a +1.
What I'm imagining is a web page I would make where you type in your map name and scenario, check off some things, maybe fill in some text boxes, and click 'go', and it comes back in a minute with a bunch of plots and statistics.
For myself - I'd like to see in invention which of the 4 civs wins most often, or which wins least often & how big a difference. With the existing charting, I can see which seat wins, but that doesn't correspond to civ side.
I'd also like to see, how often does the winner (or someone) else get a specific territory before the game is over.
Or I'd like to see, once a certain territory is taken, how many rounds does the game last after that.
I imagine once I get the basic framework done, we'd think of lots of stats we'd all love to know about our maps.
Agentpheonix: I'm sure your looking for something more invloved, but I love this extension for telling me it's my turn:
https://chrome.google.com/webstore/detail/wargear-turn-poller/fmdgmnnfapgldofahkbkadbleekflkbh
The API documentation is live - there's only a few functions there but the Game List one should help you.
If you need anything else let me know - there's plenty of other API calls that I need to document around game interaction so if someone is interested in writing code that directly controls player game actions I can prioritise that.
A quick word about authentication - this is based off browser cookies at the moment. If required I can set up other forms of auth.
See 'API' link in the page footer for more.
Thanks for this Tom, I can't wait to check it out.