feat: track match #8

Merged
Superkooka merged 20 commits from feat/fetch-matches into dev 2026-05-02 14:16:06 +00:00
Owner

PR IMMONDE
Il faut l'ORM, injection de service et un Deserializer pour riot-api mais il faut un merge rapide. ça viendra après.
Idem pour les custom qui peuvent être track uniquement en live via spectator api

PR IMMONDE Il faut l'ORM, injection de service et un Deserializer pour riot-api mais il faut un merge rapide. ça viendra après. Idem pour les custom qui peuvent être track uniquement en live via spectator api
Superkooka changed title from WIP: feat(fetch-match): trait for get Puuid to WIP: feat: track match 2026-04-11 00:23:09 +00:00
@ -0,0 +509,4 @@
}
if (!$win && str_ends_with($currentStreak, 'lose')) {
return "x" . $increment($currentStreak) . ' lose';
Author
Owner

loses

loses
Superkooka marked this conversation as resolved
@ -0,0 +501,4 @@
}
if ($win && str_ends_with($currentStreak, 'win')) {
return "x" . $increment($currentStreak) . ' win';
Author
Owner

wins

wins
Superkooka marked this conversation as resolved
@ -0,0 +155,4 @@
$matchData['profile_icon_id'],
);
$resultLabel = $matchData['win'] ? 'won' : 'loss';
Author
Owner

handle remake

handle remake
Superkooka marked this conversation as resolved
@ -0,0 +99,4 @@
/** @var array<string, array<string, mixed>> $matchDataByPuuid */
$matchDataByPuuid = [];
foreach ($puuidsInMatch as $puuid) {
$matchDataByPuuid[$puuid] = $this->riotAPI->match()->getMatch($matchId, $puuid);
Author
Owner

don't get match twice

don't get match twice
Superkooka marked this conversation as resolved
@ -0,0 +112,4 @@
$rankData = $this->fetchRank($puuid, $queueType, (int) $matchData['match_ended'], $output);
$lpGain = "remake" === $matchData['win_condition'] ? 0 : $this->computeLpGain($pdo, $puuid, $queueType, $rankData, (bool) $matchData['win']);
$lpIncertain = 0 === $lpGain && 'remake' !== $matchData['win_condition'];
Author
Owner

only if more than two match to fetch?
Currently do not support 0LP compensation on AFK or Aegis protected (B+ or more when autofiled)

only if more than two match to fetch? Currently do not support 0LP compensation on AFK or Aegis protected (B+ or more when autofiled)
Superkooka marked this conversation as resolved
@ -0,0 +121,4 @@
$streak = $this->computeStreak($pdo, $puuid, $queueType, (bool) $matchData['win'], $matchData['win_condition']);
$rankData = $this->fetchRank($puuid, $queueType, (int) $matchData['match_ended'], $output);
Author
Owner

improve handeling of non-classed queue

improve handeling of non-classed queue
Superkooka marked this conversation as resolved
Superkooka changed title from WIP: feat: track match to feat: track match 2026-04-13 14:45:44 +00:00
Superkooka force-pushed feat/fetch-matches from 71b19ed980 to 9c0aaf5586 2026-04-13 14:55:05 +00:00 Compare
@ -0,0 +123,4 @@
$rankData = $this->fetchRank($puuid, $queueType, (int) $matchData['match_ended'], $output);
$lpGain = "remake" === $matchData['win_condition'] ? 0 : $this->computeLpGain($pdo, $puuid, $queueType, $rankData, (bool) $matchData['win']);
$lpIncertain = 1 > ($untrackedLPGameCountByPuuid[$puuid] ?? 0);
Author
Owner

outdated, fix needed

outdated, fix needed
Superkooka marked this conversation as resolved
@ -0,0 +183,4 @@
'win' => $matchData['win'] ? 1 : 0,
'win_condition' => $matchData['win_condition'],
'streak' => $streak,
'role' => $matchData['role'],
Author
Owner

role harmonization needed

role harmonization needed
Superkooka marked this conversation as resolved
Superkooka force-pushed feat/fetch-matches from 2c724a849e to e5eb969693 2026-05-02 14:14:26 +00:00 Compare
Superkooka deleted branch feat/fetch-matches 2026-05-02 14:16:06 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Superkooka/lol-leaderboard!8
No description provided.