This project streams live League of Legends Iron/Bronze matches 24/7 directly to Twitch. Sit back, relax, and enjoy automated replays.
Watch the stream here: twitch.tv/sweatysmolder
Demo of code auto spectating a game once a player is found to be ingame. Note that it opens League automatically. This demo has been recorded offline in OBS to respect the user's privacy for purposes of this demo, but once approved, this workflow will be streamed on Twitch.tv. We will also keep summoners names turned off, to respect the privacy of players always.
Riot Games APIs used to find Iron players and detect in-game status.
Endpoint: GET /lol/league/v4/entries/{queueType}/{tier}/{division}?page={page}
Base URL: https://{platform}.api.riotgames.com (e.g. na1)
Returns the ranked ladder for a tier/division (e.g. RANKED_SOLO_5x5, IRON, IV). Each entry includes the player's PUUID, which we get and pass to the next API. This is how we build the list of Iron players to check.
Endpoint: GET /lol/match/v5/matches/{matchId}
Base URL: https://americas.api.riotgames.com
Used to fetch match details (e.g. to detect when a game has ended). Not used for finding players or checking if they're in game.
Endpoint: GET /lol/spectator/v5/active-games/by-summoner/{puuid}
Base URL: https://{platform}.api.riotgames.com
For each player PUUID we call this endpoint. 404 = not in a game (skip). 200 = player is in an active game; the response includes game ID, encryption key, and participants, which we use to launch spectator mode.
active-games/by-summoner/{puuid} → 404 = not in game, 200 = in game → send game info to client for spectator launch.
Reference: Riot API Docs