Closed elreco closed 4 years ago
That could happen when the request fails or rather doesnt return anything.. Is the ID and region correctly set?
Here is my init setting :
$this->riot = new LeagueAPI([
LeagueAPI::SET_KEY => env('RIOT_API_KEY'),
LeagueAPI::SET_TOURNAMENT_KEY => "",
LeagueAPI::SET_REGION => Region::EUROPE_WEST,
LeagueAPI::SET_VERIFY_SSL => false,
LeagueAPI::SET_DATADRAGON_INIT => true,
LeagueAPI::SET_STATICDATA_LINKING => true,
LeagueAPI::SET_INTERIM => true,
LeagueAPI::SET_CACHE_RATELIMIT => true,
LeagueAPI::SET_CACHE_CALLS => true,
LeagueAPI::SET_CACHE_CALLS_LENGTH=> 9999
]);
and I get the match ID using getMatchlistByAccount.
the result :
Could you try without LeagueAPI::SET_STATICDATA_LINKING
?
If it works try pulling latest version from master
, it should be fixed there 😺
It works with the latest version from master! thank you
Happy to help!
Hi!
Sometimes when I try to retrieve a match with the getMatch function I got this error :
Argument 1 passed to RiotAPI\LeagueAPI\Objects\ApiObject::__construct() must be of the type array, boolean given, called in E:\Programmes\laragon\www\probuilds\vendor\dolejska-daniel\riot-api\src\LeagueAPI\LeagueAPI.php on line 1995
The $result variable is false in the getStaticChampion function
My endpoint is : "/lol/match/v4/matches/4476606456"
Do you know why?
Thank you! :)