mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2025-02-06 20:15:46 +00:00
remove time check
This commit is contained in:
parent
ef63c1de7e
commit
9752fd323b
@ -6,9 +6,10 @@ import json
|
||||
def pull_new_tba_matches(apikey, competition, cutoff):
|
||||
api_key= apikey
|
||||
x=requests.get("https://www.thebluealliance.com/api/v3/event/"+competition+"/matches/simple", headers={"X-TBA-Auth-Key":api_key})
|
||||
json = x.json()
|
||||
out = []
|
||||
for i in x.json():
|
||||
if i["actual_time"] != None and i["actual_time"]-cutoff >= 0 and i["comp_level"] == "qm":
|
||||
for i in json:
|
||||
if i["actual_time"] != None and i["comp_level"] == "qm":
|
||||
out.append({"match" : i['match_number'], "blue" : list(map(lambda x: int(x[3:]), i['alliances']['blue']['team_keys'])), "red" : list(map(lambda x: int(x[3:]), i['alliances']['red']['team_keys'])), "winner": i["winning_alliance"]})
|
||||
return out
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user