API

Player

Public information about players. These endpoints don’t need a token.

Player statistics

Endpoint

GET /api/player-stats/:nickname

Answer 200

{
    "id": "66c9f1b2e4b0a1c2d3e4f5a6",
    "nickname": "nickname",
    "country": "UN",
    "stats": {
        "battles": 12,
        "wins": 7,
        "shipsDestroyed": 98,
        "points": 1680
    }
}

Errors

| Status | error | |β€”|β€”| | 404 | Player not found |

Leaderboard

Players sorted by points, then by wins.

Endpoint

GET /api/leaderboard?limit=20

limit is 1–100, 20 by default.

Answer 200

{
    "players": [
        {
            "rank": 1,
            "nickname": "nickname",
            "country": "UN",
            "stats": { "battles": 12, "wins": 7, "shipsDestroyed": 98, "points": 1680 }
        }
    ]
}