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

No way to limit or specify pages when using get_paginated_league_entries

vickorian opened this issue · comments

I might be missing something, but it seems that there is no way to direct the function get_paginated_league_entries to pull specific pages or to pull a range of pages. For the Masters, Grandmasters, and Challenger requests, this isn't much of a problem, but for the larger divisions, it's not really feasible to pull all of the entries. Is there a work around to this?

I've seen in cassiopeia/cassiopeia/datastores/kernel/leagues.py the class LeaguesAPI which contains the get_league_entries_list, but i can't instantiate it.

The other problem is when trying to use your framework by directly calling the LeagueAPI from cassiopeia.datastores.kernel.leagues with the correct server and ports, but requests were not accepted. Any idea what's going on?

You should be able to pull the first N entries using for entry in entries[:N], but yeah other than that there is no way to pull a specific subset of the pages or entries. Is there a reason you wouldn't want the first N entries if you only want a fraction of them anyways?

The kernel datastore is for a totally different thing, you can ignore it for your purposes. Kernel is a separate library: https://github.com/meraki-analytics/kernel , we just include some bindings in Cass for simplicity.

main reason was to limit riotapi queries. Pulling all summoners in say Silver would take a fair amount of time/burn through my queries limit since i'm still in development.

Okay, well if there is a reason you wouldn't want the first X pages, and would rather have the middle X pages, let me know. You should always be able to stop requesting more data once you have as much as you need (starting at page 0).