mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-27 01:59:08 +00:00
Merge branch 'master' of https://github.com/ltcptgeneral/tr2022-strategy
This commit is contained in:
commit
5c4bed42d6
@ -32,6 +32,12 @@ __all__ = [
|
|||||||
import requests
|
import requests
|
||||||
|
|
||||||
#as this code is public, i'm not putting 2022's API key in here. just add it as a var in your script and go
|
#as this code is public, i'm not putting 2022's API key in here. just add it as a var in your script and go
|
||||||
|
#requests basic team info
|
||||||
|
def req_team_info(team,apikey):
|
||||||
|
headers={'X-TBA-Auth-Key':apikey}
|
||||||
|
r=requests.get('https://www.thebluealliance.com/api/v3/team/frc'+str(team)+'/simple/',headers=headers)
|
||||||
|
return r
|
||||||
|
|
||||||
#requests a list of events that a team went to
|
#requests a list of events that a team went to
|
||||||
def req_team_events(team,year,apikey):
|
def req_team_events(team,year,apikey):
|
||||||
headers={'X-TBA-Auth-Key':apikey}
|
headers={'X-TBA-Auth-Key':apikey}
|
||||||
@ -65,7 +71,7 @@ def req_event_elim_alli(event_key, apikey):
|
|||||||
#requests oprs and dprs
|
#requests oprs and dprs
|
||||||
def req_event_opr(event_key, apikey):
|
def req_event_opr(event_key, apikey):
|
||||||
headers={'X-TBA-Auth-Key':apikey}
|
headers={'X-TBA-Auth-Key':apikey}
|
||||||
r=requests.get('https://www.thebluealliance.com/api/v3//event/'+str(event_key)+'/oprs', headers=headers)
|
r=requests.get('https://www.thebluealliance.com/api/v3/event/'+str(event_key)+'/oprs', headers=headers)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ function subReport() {
|
|||||||
var name = x[i].children[0].id;
|
var name = x[i].children[0].id;
|
||||||
push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value;
|
push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value;
|
||||||
} else if (x[i].children[1].tagName == "TEXTAREA") {
|
} else if (x[i].children[1].tagName == "TEXTAREA") {
|
||||||
push[`${series}-${user.uid.toString()}`.toString()][x[i].children[1].id] = x[i].children[1].innerHTML;
|
push[`${series}-${user.uid.toString()}`.toString()][x[i].children[1].id] = x[i].children[1].value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var x = document.getElementById('repsec2').children;
|
var x = document.getElementById('repsec2').children;
|
||||||
@ -369,7 +369,7 @@ function subReport() {
|
|||||||
var name = x[i].children[0].id;
|
var name = x[i].children[0].id;
|
||||||
push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value;
|
push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value;
|
||||||
} else if (x[i].children[1].tagName == "TEXTAREA") {
|
} else if (x[i].children[1].tagName == "TEXTAREA") {
|
||||||
push[`${series}-${user.uid.toString()}`.toString()][x[i].children[1].id] = x[i].children[1].innerHTML;
|
push[`${series}-${user.uid.toString()}`.toString()][x[i].children[1].id] = x[i].children[1].value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var x = document.getElementById('repsec3').children;
|
var x = document.getElementById('repsec3').children;
|
||||||
|
Loading…
Reference in New Issue
Block a user