From 6dbdfe00fcd56c1edb3bb3820a711e80c3a8b220 Mon Sep 17 00:00:00 2001 From: Jacob Levine Date: Fri, 22 Mar 2019 12:39:16 -0500 Subject: [PATCH 1/3] fixed textArea bug --- website/public/scout/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/public/scout/scripts.js b/website/public/scout/scripts.js index a11dc5b9..e9c792c5 100644 --- a/website/public/scout/scripts.js +++ b/website/public/scout/scripts.js @@ -356,7 +356,7 @@ function subReport() { var name = x[i].children[0].id; push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value; } 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; @@ -369,7 +369,7 @@ function subReport() { var name = x[i].children[0].id; push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value; } 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; From 14a04142654fad9847841fc29ab75a3350592439 Mon Sep 17 00:00:00 2001 From: jlevine18 Date: Fri, 22 Mar 2019 14:54:55 -0500 Subject: [PATCH 2/3] add req_team_info --- data analysis/tbarequest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data analysis/tbarequest.py b/data analysis/tbarequest.py index 15d02925..a5b02ab2 100644 --- a/data analysis/tbarequest.py +++ b/data analysis/tbarequest.py @@ -32,6 +32,12 @@ __all__ = [ 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 +#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 def req_team_events(team,year,apikey): headers={'X-TBA-Auth-Key':apikey} From 56f704c464422e8871f0d891620ac74ebe9d389a Mon Sep 17 00:00:00 2001 From: jlevine18 Date: Fri, 22 Mar 2019 15:09:52 -0500 Subject: [PATCH 3/3] Update tbarequest.py --- data analysis/tbarequest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data analysis/tbarequest.py b/data analysis/tbarequest.py index a5b02ab2..b7337a13 100644 --- a/data analysis/tbarequest.py +++ b/data analysis/tbarequest.py @@ -71,7 +71,7 @@ def req_event_elim_alli(event_key, apikey): #requests oprs and dprs def req_event_opr(event_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