Skip to content
Will Davies edited this page Jan 25, 2017 · 5 revisions

ATBA is an alternative way to use the API. It takes a bit more knowledge of Java to use, but if you're an advanced user or and use method calls a lot, it can be useful in certain siutations. It takes all parameters that the pull methods uses and allows you to set them with a constructor or setter methods, then you can call about 99% of all the methods using no parameters. Otherwise, everything works the same. If this doesn't make sense to you, then just use TBA class instead.

ATBA is most useful if you're pulling a lot of data with the same parameters (year, teamNumber, eventCode, etc.), but, if you're pulling lots of data with different parameters, you'll probably find TBA a bit more useful because you don't have to create a new object every time or call an extra method every time to set parameters.

If you don't fill out some parameters, ATBA methods that use them will produce errors.

Here's a quick example of using ATBA:
ATBA.setID(...);
ATBA at = new ATBA(4859, 2016, "casd", "f1m1", "ne");
Team t = at.getTeam();
Event e = at.getEvent();

If you're an advanced user, let me know if you'd like more things like this to make things more useful. Although most people who code in Java should understand constructors, the concept of methods failing without setting required parameters however might have confused me as a beginner . I'll eventually add checking for this. Thanks!

Clone this wiki locally