Links
Comment on page
📦

Responses

List of responses sent back by the API

Default Response

All responses will include either a success or an error.
Success
{
"success": true,
"code": 200,
"message": ""
}
Error
{
"success": false,
"code": 404,
"message": "Some error message here"
}
All requests to the API will always have these 3 fields including the additional data for each endpoint you use.

Example

This will be different for certain languages but should be the standard to use.
The base class for all responses
Other responses should inherit or add the default response of success, code and message along with the endpoint data. It should look like
{
"success": true,
"code": 200,
"message": "",
"r": 0,
"g": 0,
"b": 0,
"name": "White",
"hex": "#ffffff"
}