mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-11-10 06:54:45 +00:00
removed cert verification for requests library
Former-commit-id: 4914b98a21478a10be7d2f737dd6d5669b4c5681
This commit is contained in:
parent
d7ed695ad1
commit
9a1a45f1c9
@ -51,7 +51,7 @@ def get_metrics_data_formatted(client, competition):
|
|||||||
return out
|
return out
|
||||||
|
|
||||||
def get_pit_data_formatted(client, competition):
|
def get_pit_data_formatted(client, competition):
|
||||||
x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition)
|
x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition, verify=False)
|
||||||
x = x.json()
|
x = x.json()
|
||||||
x = x['data']
|
x = x['data']
|
||||||
x = x.keys()
|
x = x.keys()
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import requests
|
import requests
|
||||||
import json
|
|
||||||
from exceptions import APIError
|
from exceptions import APIError
|
||||||
from dep import load_config
|
from dep import load_config
|
||||||
|
|
||||||
@ -14,7 +13,7 @@ def get_team_competition():
|
|||||||
"CLIENT_ID": trakey['CLIENT_ID'],
|
"CLIENT_ID": trakey['CLIENT_ID'],
|
||||||
"CLIENT_SECRET": trakey['CLIENT_SECRET']
|
"CLIENT_SECRET": trakey['CLIENT_SECRET']
|
||||||
}
|
}
|
||||||
response = requests.request("GET", url + endpoint, params=params)
|
response = requests.request("GET", url + endpoint, verify=False, params=params)
|
||||||
json = response.json()
|
json = response.json()
|
||||||
if json['success']:
|
if json['success']:
|
||||||
return json['competition']
|
return json['competition']
|
||||||
@ -27,7 +26,7 @@ def get_team():
|
|||||||
"CLIENT_ID": trakey['CLIENT_ID'],
|
"CLIENT_ID": trakey['CLIENT_ID'],
|
||||||
"CLIENT_SECRET": trakey['CLIENT_SECRET']
|
"CLIENT_SECRET": trakey['CLIENT_SECRET']
|
||||||
}
|
}
|
||||||
response = requests.request("GET", url + endpoint, params=params)
|
response = requests.request("GET", url + endpoint, verify=False, params=params)
|
||||||
json = response.json()
|
json = response.json()
|
||||||
if json['success']:
|
if json['success']:
|
||||||
return json['team']
|
return json['team']
|
||||||
@ -42,7 +41,7 @@ def get_team_match_data(competition, team_num):
|
|||||||
"CLIENT_ID": trakey['CLIENT_ID'],
|
"CLIENT_ID": trakey['CLIENT_ID'],
|
||||||
"CLIENT_SECRET": trakey['CLIENT_SECRET']
|
"CLIENT_SECRET": trakey['CLIENT_SECRET']
|
||||||
}
|
}
|
||||||
response = requests.request("GET", url + endpoint, params=params)
|
response = requests.request("GET", url + endpoint, verify=False, params=params)
|
||||||
json = response.json()
|
json = response.json()
|
||||||
if json['success']:
|
if json['success']:
|
||||||
return json['data'][team_num]
|
return json['data'][team_num]
|
||||||
@ -56,7 +55,7 @@ def get_teams_at_competition(competition):
|
|||||||
"CLIENT_ID": trakey['CLIENT_ID'],
|
"CLIENT_ID": trakey['CLIENT_ID'],
|
||||||
"CLIENT_SECRET": trakey['CLIENT_SECRET']
|
"CLIENT_SECRET": trakey['CLIENT_SECRET']
|
||||||
}
|
}
|
||||||
response = requests.request("GET", url + endpoint, params=params)
|
response = requests.request("GET", url + endpoint, verify=False, params=params)
|
||||||
json = response.json()
|
json = response.json()
|
||||||
if json['success']:
|
if json['success']:
|
||||||
return list(json['data'].keys())
|
return list(json['data'].keys())
|
||||||
|
Loading…
Reference in New Issue
Block a user