mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-30 15:04:18 +00:00
28 lines
689 B
Python
28 lines
689 B
Python
|
import requests
|
||
|
import filemanager
|
||
|
|
||
|
lolkey = filemanager.readfile("lolapi.txt")
|
||
|
|
||
|
|
||
|
def getsinglestaticdata(cid, extra=None):
|
||
|
parametri = {
|
||
|
'api_key': lolkey,
|
||
|
'region': "euw",
|
||
|
'locale': "it_IT",
|
||
|
'id': cid,
|
||
|
'champData': extra,
|
||
|
}
|
||
|
r = requests.get("https://global.api.pvp.net/api/lol/static-data/euw/v1.2/champion/" + str(cid),
|
||
|
params=parametri).json()
|
||
|
return r
|
||
|
|
||
|
|
||
|
def getfreerotation():
|
||
|
parametri = {
|
||
|
'freeToPlay': 'true',
|
||
|
'region': "euw",
|
||
|
'api_key': lolkey
|
||
|
}
|
||
|
r = requests.get("https://euw.api.pvp.net/api/lol/euw/v1.2/champion", params=parametri).json()
|
||
|
return r['champions']
|