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.
Post Reply
ds.obsidian
Posts: 6
Joined: Tue May 01, 2007 9:41 pm
Location: Australia

API usage guidelines

Post by ds.obsidian »

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 :)
User avatar
runewake2
Posts: 95
Joined: Sun May 23, 2010 1:50 pm
Gender: Male
Location: Betwixt Two Curly Braces
Contact:

Re: API usage guidelines

Post by runewake2 »

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
ds.obsidian
Posts: 6
Joined: Tue May 01, 2007 9:41 pm
Location: Australia

Re: API usage guidelines

Post by ds.obsidian »

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.
blakebowling
Posts: 5093
Joined: Wed Jan 23, 2008 12:09 pm
Gender: Male
Location: 127.0.0.1

Re: API usage guidelines

Post by blakebowling »

Let me know exactly what data you are looking for, perhaps I can do something to expedite the process.
User avatar
dgz345
Posts: 1363
Joined: Thu Oct 07, 2010 10:53 am

Re: API usage guidelines

Post by dgz345 »

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.
ds.obsidian
Posts: 6
Joined: Tue May 01, 2007 9:41 pm
Location: Australia

Re: API usage guidelines

Post by ds.obsidian »

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.
User avatar
Robespierre__
Posts: 515
Joined: Sat Jun 28, 2008 2:23 pm
Gender: Male
Location: New Jersey

Re: API usage guidelines

Post by Robespierre__ »

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
ds.obsidian
Posts: 6
Joined: Tue May 01, 2007 9:41 pm
Location: Australia

Re: API usage guidelines

Post by ds.obsidian »

Yes its been quite a while.
The effects of a job with more responsibility :P
Post Reply

Return to “Tools Development”