Change: rename fields in the API to more match what it does #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A while ago we renamed a bunch of variables in the OpenTTD client,
as this old list of names wasn't always that obvious. Now we apply
the same change to the API too.
This is also needed to make sure the master-server is talking
the same language as the new upcoming game-coordinator.
This is what is changing:
server_name
->name
(we already know it is a server ..)server_revision
->openttd_version
map_set
->map_type
grfs
->newgrfs
dedicated
->is_dedicated
language
-> removed (was always ALL for 1.11)map_name
-> removed (was always "" for 1.11)num_grfs
-> removed (just count the entries innewgrfs
, no need to tell you twice)I did ponder about adding an API versioning, and clue the old fields back in .. but I realised that https://github.com/OpenTTD/master-server-web is most likely the only consumer of the API, so it felt like a lot of effort for zero gain.