-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrankmodule.py
More file actions
35 lines (28 loc) · 1.19 KB
/
rankmodule.py
File metadata and controls
35 lines (28 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from riotwatcher import LolWatcher, ApiError
api_key = 'RGAPI-c5692ce3-e7c3-46e4-aedb-4c204853075d'
watcher = LolWatcher(api_key)
my_region = 'eun1'
# print("summoner name")
def rankcheck(name):
me = watcher.summoner.by_name(my_region, name)
ranked = watcher.league.by_summoner(my_region, me['id'])
if ranked[0]['queueType'] == 'RANKED_SOLO_5x5':
rankedcomb = format(ranked[0]['tier']) + ' ' + format(ranked[0]['rank'])
elif ranked[1]['queueType'] == 'RANKED_SOLO_5x5':
rankedcomb = format(ranked[1]['tier']) + ' ' + format(ranked[1]['rank'])
else:
rankedcomb = format(ranked[2]['tier']) + ' ' + format(ranked[2]['rank'])
return rankedcomb
# return ranked[0]['tier']['rank']
'''me = watcher.summoner.by_name(my_region, input())
ranked = watcher.league.by_summoner(my_region, me['id'])
if (ranked[1]['tier']) == "IRON" or (ranked[1]['tier']) == "BRONZE" or (ranked[1]['tier']) == "SILVER":
print("you are low ELO trash")
print("your rank is " + ranked[1]['tier'])
else:
print("you are not low elo trash")
print("your rank is " + ranked[1]['tier'])
if ranked[1]['veteran']:
print("you're hardstuck")
else:
print("you're not hardstuck")'''