Skip to content

Example 2: Getting Event OPRs

Will Davies edited this page Feb 17, 2019 · 2 revisions
// Set auth token
TBA.setAuthToken("my auth token");
// create tba object
TBA tba = new TBA();
// Pull oprs
EventOPR[] opr = tba.getOprs("2016casd"); // 2016casd is the event's key
// Print
for(EventOPR o : opr) System.out.println(o); // all models include a handy .toString method

Console output:

EventOPR(teamKey=frc5474, opr=23.607326114155224, dpr=29.2701400733379, ccwm=-5.662813959182683)
EventOPR(teamKey=frc5477, opr=5.692978635890544, dpr=37.59173960341555, ccwm=-31.89876096752504)
EventOPR(teamKey=frc5514, opr=20.432182259730517, dpr=26.57773912643296, ccwm=-6.145556866702428)```
and so on...
Clone this wiki locally