mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
he /world/Topic() API has been rewritten. General function: The API is initialized upon roundstart and generates a list of possible api requests from /code/datums/api.dm Once a request is made the following checks are performed: If a query parameter is set (the function that should be called) If the ip is ratelimited (or rate-limit-whitelisted) The query is authenticated against the db using ip, function and key If these checks pass, it is validated that the api command exists Then the api command is called, all supplied params are passed through Each API function returns 1 no matter if it failed or succeded Additional info is provided in the statuscode, response and data vars The statuscode, response and data are send back to the caller (through list2params) The data var is json encoded before sending it back This is not backward compatible to the current API Current API Clients need to be updated