1
0
Fork 0
mirror of synced 2024-06-26 10:11:19 +12:00

Delete get_grade.py

This commit is contained in:
gnanini 2021-04-27 14:53:59 -03:00 committed by GitHub
parent 9db4729aff
commit 9754b4f102
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +0,0 @@
import requests
import json
def test():
# get_grade(629760)
get_grade(input('Game ID: '))
# you should iniciate the module with the game's steam code
def get_grade(steam_code):
steam_code = str(steam_code)
url = 'https://www.protondb.com/api/v1/reports/summaries/'
res = requests.get(url + steam_code + '.json')
text = res.text
lista = json.loads(text)
# print(lista['tier']) # just for debug pourpouses!!!
return lista['tier']
# test()