mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-12-30 19:39:09 +00:00
parent
c08d3d3ae7
commit
c46e74036b
@ -18,7 +18,8 @@ sample_json = """
|
|||||||
"tba":"",
|
"tba":"",
|
||||||
"tra":{
|
"tra":{
|
||||||
"CLIENT_ID":"",
|
"CLIENT_ID":"",
|
||||||
"CLIENT_SECRET":""
|
"CLIENT_SECRET":"",
|
||||||
|
"url": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"config-preference":"local",
|
"config-preference":"local",
|
||||||
|
@ -51,17 +51,10 @@ 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):
|
||||||
db = client.data_scouting
|
x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition)
|
||||||
mdata = db.teamlist.competition
|
output = x.json()
|
||||||
x=mdata.find_one({"competition":competition}) # x should be a list of teams given the soecified competition
|
data = output['data']
|
||||||
print(x)
|
return list(data.keys())
|
||||||
out = {}
|
|
||||||
for i in x:
|
|
||||||
try:
|
|
||||||
out[int(i)] = get_team_pit_data(client, competition, int(i))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return out
|
|
||||||
|
|
||||||
def get_pit_variable_data(client, competition):
|
def get_pit_variable_data(client, competition):
|
||||||
db = client.data_processing
|
db = client.data_processing
|
||||||
|
Loading…
Reference in New Issue
Block a user