Panel Alexamigo
← Memory

riot-api-reference.md

# Riot Games API - Referencia Rapida

## Endpoints principales (LoL)

### Identificacion de jugadores (Riot ID reemplaza Summoner Name)
- **PUUID desde RiotID**: `GET /riot/account/v1/accounts/by-riot-id/{gameName}/{tagLine}` (regional: americas/europe/asia)
- **RiotID desde PUUID**: `GET /riot/account/v1/accounts/by-puuid/{puuid}` (regional)
- **Summoner desde PUUID**: `GET /lol/summoner/v4/summoners/by-puuid/{encryptedPUUID}` (platform)
- **Summoner desde ID**: `GET /lol/summoner/v4/summoners/{encryptedSummonerId}` (platform)

### Platform Routing Values
| Platform | Host |
|----------|------|
| EUW1 | euw1.api.riotgames.com |
| NA1 | na1.api.riotgames.com |
| EUN1 | eun1.api.riotgames.com |
| KR | kr.api.riotgames.com |
| BR1 | br1.api.riotgames.com |
| LA1/LA2 | la1/la2.api.riotgames.com |
| JP1 | jp1.api.riotgames.com |
| OC1 | oc1.api.riotgames.com |
| TR1 | tr1.api.riotgames.com |
| RU | ru.api.riotgames.com |

### Regional Routing Values
| Region | Host |
|--------|------|
| AMERICAS | americas.api.riotgames.com |
| EUROPE | europe.api.riotgames.com |
| ASIA | asia.api.riotgames.com |
| SEA | sea.api.riotgames.com |

## Data Dragon (assets estaticos, no requiere API key)
- **Versiones**: https://ddragon.leagueoflegends.com/api/versions.json
- **Champions lista**: https://ddragon.leagueoflegends.com/cdn/{version}/data/{lang}/champion.json
- **Champion detalle**: https://ddragon.leagueoflegends.com/cdn/{version}/data/{lang}/champion/{name}.json
- **Items**: https://ddragon.leagueoflegends.com/cdn/{version}/data/{lang}/item.json
- **Summoner Spells**: https://ddragon.leagueoflegends.com/cdn/{version}/data/{lang}/summoner.json
- **Profile Icons**: https://ddragon.leagueoflegends.com/cdn/{version}/data/{lang}/profileicon.json
- **Idiomas**: https://ddragon.leagueoflegends.com/cdn/languages.json
- **Idiomas relevantes**: es_ES, en_US, pt_BR

### Assets de imagenes
- **Champion splash**: `https://ddragon.leagueoflegends.com/cdn/img/champion/splash/{name}_{skinNum}.jpg`
- **Champion loading**: `https://ddragon.leagueoflegends.com/cdn/img/champion/loading/{name}_{skinNum}.jpg`
- **Champion square**: `https://ddragon.leagueoflegends.com/cdn/{version}/img/champion/{name}.png`
- **Item icon**: `https://ddragon.leagueoflegends.com/cdn/{version}/img/item/{id}.png`
- **Spell icon**: `https://ddragon.leagueoflegends.com/cdn/{version}/img/spell/{id}.png`
- **Passive icon**: `https://ddragon.leagueoflegends.com/cdn/{version}/img/passive/{filename}.png`
- **Profile icon**: `https://ddragon.leagueoflegends.com/cdn/{version}/img/profileicon/{id}.png`

## Game Constants
- Seasons: https://static.developer.riotgames.com/docs/lol/seasons.json
- Queues: https://static.developer.riotgames.com/docs/lol/queues.json
- Maps: https://static.developer.riotgames.com/docs/lol/maps.json
- Game Modes: https://static.developer.riotgames.com/docs/lol/gameModes.json
- Game Types: https://static.developer.riotgames.com/docs/lol/gameTypes.json

## Live Client Data API (solo local, durante partida activa)
- Base: `https://127.0.0.1:2999`
- SSL self-signed (usar --insecure con curl)
- `GET /liveclientdata/allgamedata` - todos los datos
- `GET /liveclientdata/activeplayer` - jugador activo
- `GET /liveclientdata/playerlist` - lista jugadores
- `GET /liveclientdata/eventdata` - eventos partida
- `GET /liveclientdata/gamestats` - stats del juego

## Headers requeridos
```
X-Riot-Token: {api-key}
```
O bien query param: `?api_key={api-key}`

## Notas importantes
- Riot ID = gameName + tagLine (reemplaza Summoner Name desde Nov 2023)
- Campos vacios/zero no se devuelven en respuestas JSON
- Rate limits se aplican por region/platform
- ACCOUNT-V1 usa routing regional (americas/europe/asia)
- SUMMONER-V4, MATCH-V5, etc. usan routing por platform (euw1, na1, etc.)
- Match-V5 usa routing regional (americas/europe/asia)
- No se pueden crear apps que den ventaja competitiva injusta
- Se puede monetizar con registro aprobado y tier gratuito obligatorio