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
Hello, was there any change with the way asynchronous requests are done on the latest meta package?
I've recently tried migrating my project from riot-api v4.1 to riot-api-base + riot-api-league v1.0. The synchronous requests seem to work correctly, however the promise do not seem to resolve when the requests are called asynchronously.
Here's an example of code I was using with the previous version:
// fetch an ongoing game$game = $api->getCurrentGameInfo($summonerId);
$summoners = [];
foreach ($participantsas$participant) {
// fetch the league entries for each of the games participants$api->nextAsync(
function ($entryDto) use ($participant): void {
//on success add the participants'LP to the summoners array$summoners[$participant->summonerId] = $entryDto->leaguePoints;
},
function (Exception$error) use ($participant): void {
// otherwise add null$summoners[$participant->summonerId] = null;
},
'entries'
)->getLeagueEntriesForSummoner($participant->summonerId);
}
$this->api->commitAsync('entries');
This was working fine with v4.1, but silently fails on v1.0. Any idea what the reason could be ?
The text was updated successfully, but these errors were encountered:
Hello, was there any change with the way asynchronous requests are done on the latest meta package?
I've recently tried migrating my project from
riot-api
v4.1 toriot-api-base
+riot-api-league
v1.0. The synchronous requests seem to work correctly, however the promise do not seem to resolve when the requests are called asynchronously.Here's an example of code I was using with the previous version:
This was working fine with v4.1, but silently fails on v1.0. Any idea what the reason could be ?
The text was updated successfully, but these errors were encountered: