Improve get-games API
Posted: Tue May 09, 2017 8:31 am
I hope It's right to post it here...
Since a few versions (I think since 0.15) each server has a server-id.json file with an id which is identical to that server id in the get-games JSON array (https://multiplayer.factorio.com/get-ga ... ]<username>[/i]&token=<token>).
So now there are possibilities to find a suitable array entry for a running server, which I want to use to enable player statistics in our user's server interfaces.
However I have to check ALL array entries to find a matching entry for a server, and that with ALL servers. Thats not efficient.
So it would be great if you make an associative json array where the keys are the server ids so I can easily get the correct item for a given id.
PS there is also the game-id field, which I can use to get more server details, but I can't find that id in any server files.
LG
Since a few versions (I think since 0.15) each server has a server-id.json file with an id which is identical to that server id in the get-games JSON array (https://multiplayer.factorio.com/get-ga ... ]<username>[/i]&token=<token>).
So now there are possibilities to find a suitable array entry for a running server, which I want to use to enable player statistics in our user's server interfaces.
However I have to check ALL array entries to find a matching entry for a server, and that with ALL servers. Thats not efficient.
So it would be great if you make an associative json array where the keys are the server ids so I can easily get the correct item for a given id.
PS there is also the game-id field, which I can use to get more server details, but I can't find that id in any server files.
LG