scouting: Add support for /requests/request/matches_for_team
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I00bf80f2a8ee45db896adf025290e4dad4ba4273
diff --git a/scouting/webserver/requests/debug/cli/main.go b/scouting/webserver/requests/debug/cli/main.go
index 204e541..44ae761 100644
--- a/scouting/webserver/requests/debug/cli/main.go
+++ b/scouting/webserver/requests/debug/cli/main.go
@@ -72,6 +72,8 @@
"If specified, parse the file as a SubmitDataScouting JSON request.")
requestAllMatchesPtr := flag.String("requestAllMatches", "",
"If specified, parse the file as a RequestAllMatches JSON request.")
+ requestMatchesForTeamPtr := flag.String("requestMatchesForTeam", "",
+ "If specified, parse the file as a RequestMatchesForTeam JSON request.")
flag.Parse()
// Handle the actual arguments.
@@ -97,4 +99,15 @@
}
log.Printf("%+v", *response)
}
+ if *requestMatchesForTeamPtr != "" {
+ log.Printf("Sending RequestMatchesForTeam to %s", *addressPtr)
+ binaryRequest := parseJson(
+ "scouting/webserver/requests/messages/request_matches_for_team.fbs",
+ *requestMatchesForTeamPtr)
+ response, err := debug.RequestMatchesForTeam(*addressPtr, binaryRequest)
+ if err != nil {
+ log.Fatal("Failed RequestMatchesForTeam: ", err)
+ }
+ log.Printf("%+v", *response)
+ }
}