You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem with participants in FeaturedGames.
According to Riot API FeaturedGames returns Participant object, while CurrentGame uses CurrentGameParticipant. Main difference is that there is no summonerId in the Participant which causes only 1 last participant being returned in the structure when calling $api->featuredGames()->featuredGames().
To fix this:
in CurrentGame.php add check that summonerId is set, otherwise don't use associative array, i.e.:
foreach ($rawParticipants as $pkey=>$value) {
$participant = new CurrentGameParticipant($value);
if (!isset($participant->summonerId)) {
$participants[] = $participant;
} else {
$participants[$participant->summonerId] = $participant;
}
}
The text was updated successfully, but these errors were encountered:
There is a problem with participants in FeaturedGames.
According to Riot API FeaturedGames returns Participant object, while
CurrentGame uses CurrentGameParticipant. Main difference is that there is
no summonerId in the Participant which causes only 1 last participant being
returned in the structure when calling
$api->featuredGames()->featuredGames().
To fix this:
in CurrentGame.php add check that summonerId is set, otherwise don't use
associative array, i.e.:
foreach ($rawParticipants as $pkey=>$value) {
$participant = new CurrentGameParticipant($value);
if (!isset($participant->summonerId)) {
$participants[] = $participant;
} else {
$participants[$participant->summonerId] = $participant;
}
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#130>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEeQ8kvTaOnLYCnIFmhWOHcG5p8rwfpBks5rQiyVgaJpZM4LeOUk>
.
There is a problem with participants in FeaturedGames.
According to Riot API FeaturedGames returns Participant object, while CurrentGame uses CurrentGameParticipant. Main difference is that there is no summonerId in the Participant which causes only 1 last participant being returned in the structure when calling $api->featuredGames()->featuredGames().
To fix this:
in CurrentGame.php add check that summonerId is set, otherwise don't use associative array, i.e.:
The text was updated successfully, but these errors were encountered: