From dc1cd42ec27132504b721599849405607aeea1e9 Mon Sep 17 00:00:00 2001 From: vhaudiquet Date: Thu, 26 Jun 2025 10:31:38 +0200 Subject: [PATCH] Fix API update issue --- match_collector/index.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/match_collector/index.ts b/match_collector/index.ts index 2ed8df4..12caf22 100644 --- a/match_collector/index.ts +++ b/match_collector/index.ts @@ -26,7 +26,7 @@ async function main() { let i = 0; for(let challenger of challengerLeague.entries) { console.log("Entry " + i + "/" + challengerLeague.entries.length + " ...") - const puuid = await summonerPuuid(challenger.summonerId); + const puuid = challenger.puuid; const challengerGameList = await summonerGameList(puuid, latestPatchTime); for(let game of challengerGameList) { if(!gameList.includes(game) && !alreadySeenGameList.includes(game)) { @@ -103,16 +103,6 @@ async function fetchChallengerLeague() { return challengerLeague; } -async function summonerPuuid(summonerId) { - const endpoint = `/lol/summoner/v4/summoners/${summonerId}` - const url = `${base}${endpoint}?api_key=${api_key}` - - const puuidResponse = await handleRateLimit(new URL(url)); - handleError(puuidResponse) - const puuidJson = await puuidResponse.json(); - - return puuidJson.puuid; -} async function summonerGameList(puuid, startTime) { const base = "https://europe.api.riotgames.com" const endpoint = `/lol/match/v5/matches/by-puuid/${puuid}/ids`;