🎨 - Some cleaning here and there

This commit is contained in:
Florian SYLVAIN
2021-02-08 09:15:54 +01:00
parent 573cc4fb6e
commit 8c132a3bef
2 changed files with 19 additions and 16 deletions
+10 -10
View File
@@ -1,20 +1,20 @@
from riotwatcher import LolWatcher
from private import token_riot
# import pandas as pd
watcher = LolWatcher(token_riot)
region = 'EUW1'
def rank_track(player):
ranked_stats = watcher.league.by_summoner(region, player['id'])
if not ranked_stats:
return 'Unranked cette saison.'
else:
liste = []
for infos in ranked_stats:
if infos['queueType'] == 'RANKED_SOLO_5x5':
what_rank = 'Solo Queue'
elif infos['queueType'] == 'RANKED_FLEX_SR':
what_rank = 'Flexible'
liste.append([what_rank, infos['tier'], infos['rank'], infos['leaguePoints'], infos['wins'], infos['losses']])
return liste
liste = []
for infos in ranked_stats:
if infos['queueType'] == 'RANKED_SOLO_5x5':
what_rank = 'Solo Queue'
elif infos['queueType'] == 'RANKED_FLEX_SR':
what_rank = 'Flexible'
liste.append([what_rank, infos['tier'], infos['rank'], infos['leaguePoints'], infos['wins'], infos['losses']])
return liste