meraki-analytics / cassiopeia

An all-inclusive Python framework for the Riot Games League of Legends API. Cass focuses on making the data easy and fun to work with, while providing all the tools necessary to create a website or do data analysis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wrong parameters while using match-v5 endpoint

Lyfhael opened this issue · comments

hi,

Here is code :

sum = Summoner(name="Danger", region="EUW").match_history

print(sum[0])

Here are the calls made :

Making call: https://euw1.api.riotgames.com/lol/summoner/v4/summoners/by-name/Danger
Making call: https://europe.api.riotgames.com/lol/match/v5/matches/by-puuid/xxx/ids?beginIndex=0&endIndex=100
Match(id=EUW1_5393916440, region='EUROPE')

The issue here is it returns only the 20 last games and no more. This is due to these two parameters ?beginIndex=0&endIndex=100 which are not valid anymore.
The ones used for match-v5 endpoint are ?start=0&count=50 (basically just need to rename the two parameters)

If I remember right, it also used to automatically fetch more games if we went over the list.
So let's say I grabbed the 20 first games. Then I do sum[25].id, it shouldn't throw an error but fetch the next 20 games. But now it throws an error

I've been going through this issue as well - hope there is a fix soon!