mirror of
https://github.com/Floriansylvain/Risitas_BOT.git
synced 2026-08-19 19:53:19 +02:00
🎨 - Syntax improvement and compliance with the PEP 8 convention
This commit is contained in:
+7
-6
@@ -1,12 +1,13 @@
|
||||
from riotwatcher import LolWatcher
|
||||
from private import token_riot
|
||||
from private import TOKEN_RIOT
|
||||
|
||||
watcher = LolWatcher(token_riot)
|
||||
region = 'EUW1'
|
||||
WATCHER = LolWatcher(TOKEN_RIOT)
|
||||
REGION = 'EUW1'
|
||||
|
||||
def rank_track(player):
|
||||
ranked_stats = watcher.league.by_summoner(region, player['id'])
|
||||
|
||||
'''function that communicate with Riot API'''
|
||||
ranked_stats = WATCHER.league.by_summoner(REGION, player['id'])
|
||||
|
||||
if not ranked_stats:
|
||||
return 'Unranked cette saison.'
|
||||
|
||||
@@ -17,4 +18,4 @@ def rank_track(player):
|
||||
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
|
||||
return liste
|
||||
|
||||
Reference in New Issue
Block a user