“Let’s be clear. We all know that there is no CG API. If you claim to have ever seen one, you will be called a liar…”
This being said…
At this time, there are 3 tools around CG (at least, 3 that I know of ) :
CG stats : http://cgstats.magusgeek.com/
CG Puzzle Status : http://cgstats.crocoware.com/
Royale tool ™ : http://apps.rezonux.com/codingame/
At least for both of them, the API usage is far from optimal. They use only a few percentage of the big Json data information they could find from the web site. Providing improved API would be beneficial for both sides :
- the tools will be faster, more officient and easier to maintain
- the CG website won’t suffer to repeated requests extracting too much data from complex requests, where lighter ones would suffice.
What do you think ? Has codingame team some time to work on this subject ?
I can provide some ideas for basic API specs, and I’m pretty sure that people like Magus (for example) would be happy to help on this subject too…
This is a great idea. The fact is that our architecture is currently changing a lot. At the moment, the “api” is quite stable but expect it to change.
The new architecture is the one used in the new beta program (www.codingame.com/contribute). At the moment, it is used only for courses created with this tool but we will probably move the whole system to this new architecture in the future.
The reason is that it is more flexible (the community will be able to create new languages, update them, add frameworks and so on), more powerful and standardised (Git and Docker, yes ;))
As we have a risk to change the “API” in the future, we can’t take the time to code a probably already obsolete API.
However, if you want to suggest an API structure for your needs, for sure we will look at it and try to do our best to integrate it during the migration.
Ok, thanks for the informations.
Then, to be able to work and communicate around these ideas, I initiated a github repo with some API I retro-engineered, and those given by Magus in another thread.
The aim is to document known APIs, and ask for new ones to codingames team.
Also, each API has a “meta-information” section which tells about the status of the API : pending (waiting for confirmation from codingame team), requested, deprecated…
Anyone willing to help, correct and/or improve is welcome !
Maybe some API for exporting replays usable on offline?
Actual JSON data is partial, usable for a GUI replay, but it lacks inputs of each player, data is rounded to int, etc…
It would be nice to have some kind of exporter, this way we can offline test, and the CG servers are relieved of some physics testing.
Using stderr is useful, but gives partial data.
I’m really interested in an API call that will let me connect my account and pull my statistics like rank and level. Similar to the CodeWars API.