Skip to content

Example 1: Pulling a model

Will Davies edited this page Jul 9, 2017 · 1 revision
// Set TBA auth token
TBA.setAuthToken("my auth token")
// Create TBA object
TBA tba = new TBA();
// Pull the team object (make sure to do this asynchronously if it updates an UI 
Team team = tba.getTeam(4859);
// Each model has a handy .toString method
System.out.println(team);

Console output:
Team(address=null, postalCode=55920, GMAPSPlaceID=null, GMAPURL=null, latitude=0.0, longitude=0.0, locationName=null, website=http://byron4859.weebly.com/, rookieYear=2013, motto=Robotics is for Everyone )

The format for data requests are very similar, the above code will work for the Event model, the Match model, and so on.

Clone this wiki locally