dolejska-daniel/riot-api-league

Question about match-v5

Opened this issue ยท 21 comments

Hey I really enjoy your work and i want to know if you will update the match V4 to V5 ?

https://twitter.com/RiotGamesDevRel/status/1382471243744518145

Thanks !

Hello! I'm happy to hear that you enjoy the library. I'll soon take a look at updating the endpoints.

Thanks you're the best !!

Let's keep the issue open until I actually update the endpoints ๐Ÿ˜…

I am not yet able to generate the data classes as they are not in the official documentation. I will update the endpoints and generate corresponding data classes once the documentation is up-to-date.

@dolejska-daniel any news here? Since we are getting close to the depprecation date on July 26th, 2021. I've been use this library by two years on a great website, it's very good.

Hey @regiszanandrea! Yeah, I will create the endpoints this week and use old DTOs for now.

@regiszanandrea soo... I did it now ๐Ÿ˜… However be careful! I just now uncovered that my Application API key does not have access to Match v5 endpoints just yet, resulting in endpoint calls throwing Forbidden exceptions.

Thank you for your hard work.
In my opinion, there seems to be no reason to change it hastily because the official document has not been specified yet.
It is not yet available for production, and some matching records retrieved from v4 were not available in v5.
It will be released sometime in June, so it seems to be enough time.

hey @dolejska-daniel , can you add type param on endpoint /lol/match/v5/matches/by-puuid/{puuid}/ids to filter tournament matches? It would be very useful. The endpoint only accepts: ranked, normal, tourney or tutorial.

Also, the MatchDto is not setting any data to it's attributes on match-v5 getMatch method, here is a example:
image

Hey @regiszanandrea, I've added the type and queue parameters to the getMatchIdsByPUUID API method.

Furthermore, the MatchDto is not filled by values because the structure of the object has changed; however, the new structure is not yet published or finalized as it seems from Riot's developer docs. For now, you can use $m->getData()["metadata"]["matchId"] to get information that you need.

Thank you @dolejska-daniel , yes, I'm already using getData method.

I appreciate it.

Hey , I'm Getting this error after updating to version 5.0 and trying to use $api->getTimeline('BR1_123456');
is there anything i can do to fix it ?
image

Obs: if i try this code after the async it does not work , if i try before the async it works fine.

Thank you for noticing and reporting this @Lucasnl! It should now be fixed in the latest version!

As of 9162ab5 (v1.1.1) the API object definitions should be up-to-date with the developer docs.

hi , i'm having this problem when i try to use getMatchIdsByPUUID() , Same with getMatch();

image

my code:

`<?php 

require_once __DIR__  . "/vendor/autoload.php";

use RiotAPI\LeagueAPI\LeagueAPI;
use RiotAPI\Base\Definitions\Region;
use RiotAPI\DataDragonAPI\DataDragonAPI;
use RiotAPI\Base\Definitions\Platform;

//  Initialize the library
$api = new LeagueAPI([
	//  Your API key, you can get one at https://developer.riotgames.com
	
	LeagueAPI::SET_KEY    => 'MyKey',
	
	//  Target region (you can change it during lifetime of the library instance)
	LeagueAPI::SET_REGION => Region::BRASIL,
	LeagueAPI::SET_CACHE_CALLS => true,
	LeagueAPI::SET_CACHE_CALLS_LENGTH => 860,
	LeagueAPI::SET_CACHE_RATELIMIT => true,

  DataDragonAPI::initByCdn(),

]);


$matches = ($api->getMatchIdsByPUUID("wek5bnQHrtoFiNeRtLDmZPMfIPm-Ym9ZGZFElDfdDUf_X210Apdcz7pux-HA5hAJbT0IPJ0lCTsD-Q",420));




?>`

@Lucasnl

$summoner = $api->getSummonerByName("Summoner name");
$matchlist = $api->getMatchIdsByPUUID($summoner->puuid);

Hey , thanks for the reply !
I've tried that but i get the same error.
if i change the line 1361 to $content_region = "americas" it works fine

$name = $_REQUEST['name'];
$summoner = $api->getSummonerByName($name);

$matches = $api->getMatchIdsByPUUID($summoner->puuid,420,NULL,NULL,30);

image

Hey , thanks for the reply ! I've tried that but i get the same error. if i change the line 1361 to $content_region = "americas" it works fine

$name = $_REQUEST['name'];
$summoner = $api->getSummonerByName($name);

$matches = $api->getMatchIdsByPUUID($summoner->puuid,420,NULL,NULL,30);

image

Just figured out , the method name is not getCorrespondingContinentRegion() , the method name is getContinentRegion()
so i change the code to

$continent_region = $this->platforms->getContinentRegion($this->getSetting(self::SET_PLATFORM));
and it worked !

image

PaXyL commented

Hey @dolejska-daniel ! Thanks for your work,
i use this Issue for asking you if you can add startTime and endTime param to /lol/match/v5/matches/by-puuid/{puuid}/ids ? That could help to filter match list for a user :)

Sorry for the awful delay, everyone. All this should be available in #12. Maybe by the end of the week?