-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
36 lines (31 loc) · 940 Bytes
/
main.py
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
36
'''Main module'''
from pprint import pprint
from ugg import get_champions_mapping
from ugg import get_patch
from ugg import get_ugg_overview
from ugg import get_ugg_patch
from ugg import humanize_ugg_overview
def main():
'''Main function'''
patch = get_patch(index=1)
if patch is None:
print('Could not parse patch data from ddragon.')
return
mapping = get_champions_mapping(patch)
if mapping is None:
print('Could not parse champions data from ddragon.')
overview = get_ugg_overview({
'patch': get_ugg_patch(patch),
'champion_id': mapping['Kennen'],
'queue': 'normal_aram',
'region': 'world',
'rank': 'overall',
'role': 'none',
})
if overview is None:
print('Could not parse overview data from ugg.')
return
overview = humanize_ugg_overview(overview)
pprint(overview)
if __name__ == '__main__':
main()