Conquer Club

API usage guidelines

Discuss developing tools and get details on Conquer Club's API.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

API usage guidelines

Postby ds.obsidian on Wed Dec 10, 2014 8:39 am

Can I get some "polite usage" limits for the API, I dont want to cause any lag issues for anyone.

http://www.conquerclub.com/forum/viewtopic.php?f=529&t=202362 indicates the server rate limits to 5req / 10s. Is this still accurate? Are there particular times of day/week that have lower load and are more acceptable for increased usage? (Would scraping this after Christmas be preferable?)

I'd like to pull a reasonable portion of the gamelist data to plot changes in popularity of maps and game options. The Map stats page only list the total games/map since release, current popularity is not available.

Thanks :)
Sergeant 1st Class ds.obsidian
 
Posts: 6
Joined: Tue May 01, 2007 9:41 pm
Location: Australia

Re: API usage guidelines

Postby runewake2 on Thu Dec 11, 2014 12:40 am

The API limit is accurate last I checked. At the moment calculating these kinds of statistics will be difficult because of that.

I think it might be easiest to slowly build a database of completed games. You can stretch this out so as not to go over the server limit. You should be able to use each games event and event timestamp to see when the game started and ended and use that to help plot your data. This has the disadvantage of not being accurate near the current time.

Depending on the sample size you are looking for you could just do a single request for Active games. This will get you 200 (I think) active games. I don't think this is "Random" but it might be enough to get you moving in the right direction.
Conquer Club Mobile Apps: Conqueror for Windows Phone and Windows 8
Conqueror's going Open Source: Conqueror on CodePlex
User avatar
Corporal 1st Class runewake2
 
Posts: 95
Joined: Sun May 23, 2010 1:50 pm
Location: Betwixt Two Curly Braces

Re: API usage guidelines

Postby ds.obsidian on Thu Dec 11, 2014 1:12 am

Thanks,

I'll spread the load out over the next few weeks.

I calculated that it would take 18hrs at the rate limit to pull the whole match history (12mil games and ~9GB) but I dont really need the whole thing.
Sergeant 1st Class ds.obsidian
 
Posts: 6
Joined: Tue May 01, 2007 9:41 pm
Location: Australia

Re: API usage guidelines

Postby blakebowling on Thu Dec 11, 2014 11:43 am

Let me know exactly what data you are looking for, perhaps I can do something to expedite the process.
Private blakebowling
 
Posts: 5093
Joined: Wed Jan 23, 2008 12:09 pm
Location: 127.0.0.1

Re: API usage guidelines

Postby dgz345 on Thu Dec 11, 2014 3:26 pm

ds.obsidian wrote:Can I get some "polite usage" limits for the API, I dont want to cause any lag issues for anyone.

http://www.conquerclub.com/forum/viewtopic.php?f=529&t=202362 indicates the server rate limits to 5req / 10s. Is this still accurate? Are there particular times of day/week that have lower load and are more acceptable for increased usage? (Would scraping this after Christmas be preferable?)

I'd like to pull a reasonable portion of the gamelist data to plot changes in popularity of maps and game options. The Map stats page only list the total games/map since release, current popularity is not available.

Thanks :)


the reason the limit was added was because 1/2 userscripts where calling the api way to much. during the time with the old server. the limit was one thing that bW did to try to reduce the load on the site. but it may be possible to remove that limit now with the new servers.
User avatar
Lieutenant dgz345
 
Posts: 1362
Joined: Thu Oct 07, 2010 10:53 am

Re: API usage guidelines

Postby ds.obsidian on Sat Dec 13, 2014 10:34 am

dgz345 - I'm certainly not suggesting removal of rate limiting, its a necessary part of public apis.

blakebowling, its been about 7 yrs since I played CC regularly and there has been a huge increase in maps and options.
I've found it can be difficult to judge the effect certain combinations will have when I join a game and I'm interested in running some analysis to find common combinations and the likely effects on gameplay.
I have a bunch of comparisons I intend to run, but I'm sure I'll find some I'm not expecting. I'll then make the results available for informed commentary re. new player intros, maintaining player activity etc. I have a few other suggestions but they really depend on the general shape of the numbers so I'll leave that till I have a better idea of whats happened in the past.
Sergeant 1st Class ds.obsidian
 
Posts: 6
Joined: Tue May 01, 2007 9:41 pm
Location: Australia

Re: API usage guidelines

Postby Robespierre__ on Wed Dec 17, 2014 10:44 pm

Not to go off topic, but your gap between games is truly impressive:

2008-07-07 20:39:16 - Curlyburly eliminated ds.obsidian from the game
2014-11-08 16:31:01 - ds.obsidian held the For the Win objective
User avatar
Captain Robespierre__
 
Posts: 515
Joined: Sat Jun 28, 2008 2:23 pm
Location: New Jersey

Re: API usage guidelines

Postby ds.obsidian on Thu Dec 18, 2014 7:03 am

Yes its been quite a while.
The effects of a job with more responsibility :P
Sergeant 1st Class ds.obsidian
 
Posts: 6
Joined: Tue May 01, 2007 9:41 pm
Location: Australia


Return to Tools Development

Who is online

Users browsing this forum: No registered users