Devices
Manage registered Playdate devices
API Usage
How to authenticate your Playdate device
1. Register Device
POST /api/register
Content-Type: application/json
{ "displayName": "My Playdate" }2. Use Token in Requests
POST /api/battles
Authorization: Bearer <your-secret-token>
Content-Type: application/json
{ "mapData": {...} }3. Submit Turns
POST /api/turns
Authorization: Bearer <your-secret-token>
Content-Type: application/json
{
"battleId": "abc123",
"actions": [
{ "type": "move", "unitId": "u1", "from": {"x":1,"y":2}, "to": {"x":3,"y":2} },
{ "type": "attack", "unitId": "u1", "targetId": "enemy1" },
{ "type": "end_turn" }
],
"gameState": { ... }
}