src.core.apis.riot module

api scraping for riot api

src.core.apis.riot.getEqualDistGameSamples(rank, queue, division, maxPageNumber, samplesize=10, saveLocation='meta/placeholder')[source]

generates a sample of matchfiles, based on rank, queue and division

Parameters:
  • rank (str) – the competetive rank in lol. Needs to be capslock, f.ex.: DIAMOND

  • queue (str) – the queue in which the rank is aqquiered. Supports: RANKED_SOLO_5x5, RANKED_TFT, RANKED_FLEX_SR, RANKED_FLEX_TT (really?)

  • division (str) – Accepts: I, II, III, IV

  • maxPageNumber (int) – the maximum pagenumber of this sample

  • samplesize (int, optional) – the number of matches that gets streamed

  • saveLocation (str, optional) – a custom location, where the data gets saved. standard is: “src/scraping”

Return type:

None

src.core.apis.riot.getGameById(gameid, saveLocation, meta='')[source]

loads the matchdata of a gameid

Parameters:
  • gameid (str) – the gameid of the match, we load

  • devKey (bool) – if true, releases the wait time of 1 second

  • saveLocation (str) – the location of the saved matchfiles

  • meta (str)

Returns:

matchdict – a dict of matchdata

Return type:

dict

src.core.apis.riot.getGameIdsByPuuid(puuid)[source]

loads a list of match ids

Parameters:
  • puuid (str) – the puuid the last 100 matches will get from

  • devKey (bool) – if true, releases the wait time of 1 second

Returns:

matchdict – a dict of matchids

Return type:

dict

src.core.apis.riot.getMaxPageNumber(rank, queue, division)[source]

a binary search for the last filled page in the summoner sample request

Parameters:
  • rank (str) – the competetive rank in lol. Needs to be capslock, f.ex.: DIAMOND

  • queue (str) – the queue in which the rank is aqquiered. Supports: RANKED_SOLO_5x5, RANKED_TFT, RANKED_FLEX_SR, RANKED_FLEX_TT (really?)

  • division (str) – Accepts: I, II, III, IV

Returns:

maxPage – the maximum filled page

Return type:

int

src.core.apis.riot.getPUIDbySummAndTagline(summonername, tagline)[source]

loads the metadata of a league account by summ and tagline

Parameters:
  • summonername (str) – the summonername, which the puid bases of

  • tagline (str) – the tagline aswell

  • devKey (bool) – if true, releases the wait time of 1 second

Returns:

puuid – the puuid according to the account

Return type:

str

src.core.apis.riot.getSummonerSample(rank, queue, division, page=1)[source]

loads a sample of players according to the passed arguments.

Parameters:
  • rank (str) – the competetive rank in lol. Needs to be capslock, f.ex.: DIAMOND

  • queue (str) – the queue in which the rank is aqquiered. Supports: RANKED_SOLO_5x5, RANKED_TFT, RANKED_FLEX_SR, RANKED_FLEX_TT (really?)

  • division (str) – Accepts: I, II, III, IV

  • page (int) – the amount of samples, downloaded

  • devKey (bool) – if true, releases the wait time of 1 second

Return type:

list[dict]

Dependency Diagrams (without externals):

digraph imports {
  rankdir=LR;
  node [shape=box];
  "src.visuals.windows.main_window" -> "src.core.apis.riot";
  "src.visuals.windows.main_window" -> "src.visuals.windows.sample_dialog";
  "src.visuals.windows.sample_dialog" -> "src.core.apis.riot";
}

Import dependencies (collapsed)

Dependency Diagrams:

digraph imports {
  rankdir=LR;
  node [shape=box];
  "src.visuals.windows.main_window" -> "src.core.apis.riot";
  "src.visuals.windows.main_window" -> "src.visuals.windows.sample_dialog";
  "src.visuals.windows.sample_dialog" -> "src.core.apis.riot";
}

Import dependencies (collapsed)