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.
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.