Het Satasiya | c34b3ea | 2022-02-06 17:28:49 -0800 | [diff] [blame^] | 1 | package main |
| 2 | |
| 3 | // To run the demo, ensure that you have a file named scouting_config.json at the workspace root with your TBA api key in it. |
| 4 | import ( |
| 5 | "log" |
| 6 | |
| 7 | "github.com/davecgh/go-spew/spew" |
| 8 | "github.com/frc971/971-Robot-Code/scouting/scraping" |
| 9 | ) |
| 10 | |
| 11 | func main() { |
| 12 | // Get all the matches. |
| 13 | matches, err := scraping.AllMatches("2016", "nytr", "") |
| 14 | // Fail on error. |
| 15 | if err != nil { |
| 16 | log.Fatal("Error:", err.Error) |
| 17 | } |
| 18 | // Dump the matches. |
| 19 | spew.Dump(matches) |
| 20 | } |