-
Notifications
You must be signed in to change notification settings - Fork 0
Home
API endpoints DNS killhitstudios example endpoint /nhttp://killhitstudios.com:5000/getgamedata/2 /nhttp://killhitstudios.com:5000/getbotimage/4
Returns details about the next game with no winner, including the details of the two bots competing.
GET /getnextgame
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"
}
}Returns the image data for the bot with the specified bot_id.
GET /getbotimage/2
HTTP 200 OK Content-Type: image/png
<Image data for bot with bot_id "2">
This endpoint returns the details for the bot with the specified bot_id.
{
"botId": "1",
"name": "Bot 1",
"battleCapability": "string of text",
"wins": 5,
"losses": 3,
"imageId": "5e8b3f3c086f9a6d4a6b4f6c"
}This endpoint returns the details for the game with the specified game_id.
{
"gameId": 1,
"team1": "botId",
"team2": "botId",
"winner": "botId",
"resulttext": "Bot 1 won the battle!"
}Returns details about the next 20 games with no winner.
{
"games": [
{
"gameId": 1,
"team1": "1",
"team2": "2"
},
{
"gameId": 2,
"team1": "2",
"team2": "4"
},
]
}Returns a leaderboard of the top 15 bots with the most wins.
{
"leaderboard": [
{
"botId": "1",
"wins": 10
},
{
"botId": "2",
"wins": 9
},
]
}Returns details about all games where the bot with the specified bot_id is a player.
{
"games": [
{
"gameId": 1,
"team1": "0001",
"team2": "0002",
"winner": "0001",
"resultText": "Bot 1 won the battle!"
},
{
"gameId": 2,
"team1": "0001",
"team2": "0003",
"winner": "0003",
"resultText": "Bot 3 won the battle!"
},
]
}This endpoint generates the result of a battle between two bots and returns the result text and the winner. The gameId for the game to be generated must be included in the request body as a JSON object.
Request Example:
{
"gameId": 1
}Response Example:
{
"resulttext": "Bot 1 won the battle!",
"winner": "0001"
}