Skip to content
tommywaaf edited this page Feb 18, 2023 · 36 revisions

Endpoint: /getnextgame

Description:

Returns details about the next game with no winner, including the details of the two bots competing.

Request:

GET /getnextgame

Response:

HTTP 200 OK Content-Type: application/json

{
    "gameId": 123,
    "team1": {
        "name": "Bot A",
        "battleCapability": "string of text",
        "wins": 5,
        "losses": 2,
        "botId": "1",
        "imageId": "xyz123"
    },
    "team2": {
        "name": "Bot B",
        "battleCapability": "string of text",
        "wins": 7,
        "losses": 1,
        "botId": "2",
        "imageId": "abc456"
    }
}

Endpoint: /getbotimage/<bot_id>

Description:

Returns the image data for the bot with the specified bot_id.

Request:

GET /getbotimage/2

Response:

HTTP 200 OK Content-Type: image/jpeg

<Image data for bot with bot_id "2">

Clone this wiki locally