Scouting App: Add View data webserver
Add methods to return all Notes, Stats, and Driver Rankings.
Signed-off-by: Filip Kujawa <filip.j.kujawa@gmail.com>
Change-Id: I0cc8531c9aa34e8dbccf08cada9957272537024f
diff --git a/scouting/webserver/requests/debug/debug.go b/scouting/webserver/requests/debug/debug.go
index fc0896c..08cf67c 100644
--- a/scouting/webserver/requests/debug/debug.go
+++ b/scouting/webserver/requests/debug/debug.go
@@ -11,7 +11,9 @@
"github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/error_response"
"github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/refresh_match_list_response"
+ "github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/request_all_driver_rankings_response"
"github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/request_all_matches_response"
+ "github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/request_all_notes_response"
"github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/request_data_scouting_response"
"github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/request_matches_for_team_response"
"github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/request_notes_for_team_response"
@@ -117,6 +119,12 @@
request_all_matches_response.GetRootAsRequestAllMatchesResponse)
}
+func RequestAllDriverRankings(server string, requestBytes []byte) (*request_all_driver_rankings_response.RequestAllDriverRankingsResponseT, error) {
+ return sendMessage[request_all_driver_rankings_response.RequestAllDriverRankingsResponseT](
+ server+"/requests/request/all_driver_rankings", requestBytes,
+ request_all_driver_rankings_response.GetRootAsRequestAllDriverRankingsResponse)
+}
+
func RequestMatchesForTeam(server string, requestBytes []byte) (*request_matches_for_team_response.RequestMatchesForTeamResponseT, error) {
return sendMessage[request_matches_for_team_response.RequestMatchesForTeamResponseT](
server+"/requests/request/matches_for_team", requestBytes,
@@ -147,6 +155,12 @@
request_notes_for_team_response.GetRootAsRequestNotesForTeamResponse)
}
+func RequestAllNotes(server string, requestBytes []byte) (*request_all_notes_response.RequestAllNotesResponseT, error) {
+ return sendMessage[request_all_notes_response.RequestAllNotesResponseT](
+ server+"/requests/request/all_notes", requestBytes,
+ request_all_notes_response.GetRootAsRequestAllNotesResponse)
+}
+
func RequestShiftSchedule(server string, requestBytes []byte) (*request_shift_schedule_response.RequestShiftScheduleResponseT, error) {
return sendMessage[request_shift_schedule_response.RequestShiftScheduleResponseT](
server+"/requests/request/shift_schedule", requestBytes,