Skip to content

Instantly share code, notes, and snippets.

@misaelvillaverde
Last active February 12, 2026 17:39
Show Gist options
  • Select an option

  • Save misaelvillaverde/23191017f10c00efb286c3ef91fc09d7 to your computer and use it in GitHub Desktop.

Select an option

Save misaelvillaverde/23191017f10c00efb286c3ef91fc09d7 to your computer and use it in GitHub Desktop.
Pixel Canvas - Fase 2: Endpoints de Inteligencia

Pixel Canvas - Fase 2: Endpoints de Inteligencia

Estos endpoints se habilitan cuando el instructor activa la Fase 2. Requieren autenticacion (Authorization: Bearer TU-API-KEY).

Base URL: https://pixels.misael.software


GET /api/leaderboard

Ranking de jugadores por pixeles actualmente en el tablero.

curl https://pixels.misael.software/api/leaderboard
{
  "leaderboard": [
    { "name": "jugador1", "pixels": 45 },
    { "name": "jugador2", "pixels": 30 },
    { "name": "jugador3", "pixels": 12 }
  ]
}

GET /api/activity

Historial reciente de colocaciones. limit es opcional (1-100, default 20).

curl -H "Authorization: Bearer PXL-XXXX-XXXX" \
  "https://pixels.misael.software/api/activity?limit=5"
{
  "activity": [
    {
      "x": 64,
      "y": 64,
      "color": "#FF0000",
      "player": "jugador1",
      "placed_at": "2026-02-12T18:35:00.000Z"
    },
    {
      "x": 10,
      "y": 20,
      "color": "#00FF00",
      "player": "jugador2",
      "placed_at": "2026-02-12T18:34:50.000Z"
    }
  ]
}

GET /api/canvas/player/:name

Todos los pixeles actualmente en el tablero de un jugador especifico.

curl https://pixels.misael.software/api/canvas/player/jugador1
{
  "name": "jugador1",
  "pixels": [
    { "x": 10, "y": 20, "color": "#00FF00" },
    { "x": 11, "y": 20, "color": "#00FF00" },
    { "x": 12, "y": 20, "color": "#00FF00" }
  ]
}

Si la fase 2 no esta activa:

{
  "error": "This endpoint is not available yet",
  "phase_required": 2
}

Tools MCP a implementar

Tool Descripcion
get_leaderboard Llama GET /api/leaderboard
get_activity Llama GET /api/activity con limit opcional
get_player_pixels Llama GET /api/canvas/player/:name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment