You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 28, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+20-39Lines changed: 20 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Java client library to retrieve data from The Blue Alliance using TBA API v3
4
4
5
-
The library is essentially complete, but documentation is in progress.
5
+
Full Javadoc documentation can be found [here](/docs/)
6
6
7
7
## Usage
8
8
@@ -13,59 +13,40 @@ Begin by creating a TBA object with your Read TBA API Key. This can be found or
13
13
14
14
### Regular Usage
15
15
16
-
The library allows access to almost all of the calls in [The Blue Alliance API v3 documentation](https://www.thebluealliance.com/apidocs/v3). They are grouped into requests with team, event, district, or match parameters:
16
+
The library allows access to almost all of the calls in [The Blue Alliance API v3 documentation](https://www.thebluealliance.com/apidocs/v3).
17
17
18
-
**`tba.teamRequest`**
18
+
They are grouped into requests with team, event, district, or match parameters, and you will need to use the `teamRequest`, `eventRequest`, or `matchRequest` instance variables found in the [`TBA` class](/docs/com/thebluealliance/api/v3/TBA.html).
19
19
20
-
*`getTeam(teamNumber)`: Gets a `Team` object for the team referenced by the given number (an `int`).
21
-
*`getSimpleTeam(teamNumber): Gets a `SimpleTeam` object for the team referenced by the given number.
22
-
* `getYearsParticipated(teamNumber): Gets a list of years in which the team participated in at least one competition.
23
-
* getDistricts(teamNumber): Gets a list of `District` objects for each year the team was in a district. Will return `null` if the team was never in a district.
24
-
* to be continued
20
+
Here is an example of retrieving an array of teams in the FIRST Mid-Atlantic district in 2017:
A list of request methods for each request object can be found [here](/docs/com/thebluealliance/api/v3/requests/package-summary.html).
37
25
38
26
### Advance Usage
39
27
40
-
If you want to utilize the `If-Modified-Since` and `Last-Modified` headers, you will need to make a direct URL request (following the documentation). This will return an `APIResponse` object with JSON data, the HTTP response code, and the `Last-Modified` header.
28
+
If you want to utilize the `If-Modified-Since` and `Last-Modified` headers, you will need to make a direct URL request with the [`getDataTBA(String urlDirectory)` method](/docs/com/thebluealliance/api/v3/requests/DataRequest.html#getDataTBA-java.lang.String-java.lang.String-) in the [`DataRequest` class](/docs/com/thebluealliance/api/v3/requests/DataRequest.html). This will return an [`APIResponse`](/docs/com/thebluealliance/api/v3/requests/APIResponse.html) object with JSON data, the HTTP response code, and the `Last-Modified` header.
41
29
42
-
The JSON data will need to be deserialized into an object model with a method in the `Deserializer` class before being used.
30
+
The JSON data will need to be deserialized into an object model with a method in the [`Deserializer` class](/docs/com/thebluealliance/api/v3/Deserializer.html) before being used.
43
31
44
-
Here is an (extremely inefficient) example of continuously fetching the `Team` objects for an event (`2017njfla`), if they have been updated.
32
+
Here is an example of continuously fetching the `Match` objects for the 2017 Mount Olive District Event, if they have been updated. Note that this is very inefficient.
*`String getName()`: The name of the award as provided by FIRST. May vary for the same award type.
65
-
*`int getAwardType()`: Type of award given. See [here](https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/award_type.py#L6) for details.
66
-
*`String getEventKey()`: The `event_key` of the event the award was won at.
67
-
*`AwardRecipient[] getRecipientList()`: A list of recipients of the award at the event. Either team_key and/or awardee for individual awards.
68
-
*`int getYear()`: The year this award was won.
49
+
A list of object model classes and their getter methods for instance varaibles can be found [here](/docs/com/thebluealliance/api/v3/models/package-summary.html)
<li><ahref="com/thebluealliance/api/v3/requests/APIResponse.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">APIResponse</a></li>
16
+
<li><ahref="com/thebluealliance/api/v3/models/Award.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Award</a></li>
17
+
<li><ahref="com/thebluealliance/api/v3/Constants.html" title="class in com.thebluealliance.api.v3" target="classFrame">Constants</a></li>
18
+
<li><ahref="com/thebluealliance/api/v3/requests/DataRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">DataRequest</a></li>
19
+
<li><ahref="com/thebluealliance/api/v3/Deserializer.html" title="class in com.thebluealliance.api.v3" target="classFrame">Deserializer</a></li>
20
+
<li><ahref="com/thebluealliance/api/v3/models/District.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">District</a></li>
21
+
<li><ahref="com/thebluealliance/api/v3/models/DistrictRanking.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">DistrictRanking</a></li>
22
+
<li><ahref="com/thebluealliance/api/v3/requests/DistrictRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">DistrictRequest</a></li>
23
+
<li><ahref="com/thebluealliance/api/v3/models/EliminationAlliance.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">EliminationAlliance</a></li>
24
+
<li><ahref="com/thebluealliance/api/v3/models/Event.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Event</a></li>
25
+
<li><ahref="com/thebluealliance/api/v3/models/EventDistrictPoints.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">EventDistrictPoints</a></li>
26
+
<li><ahref="com/thebluealliance/api/v3/models/EventPoints.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">EventPoints</a></li>
27
+
<li><ahref="com/thebluealliance/api/v3/models/EventRankings.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">EventRankings</a></li>
28
+
<li><ahref="com/thebluealliance/api/v3/requests/EventRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">EventRequest</a></li>
29
+
<li><ahref="com/thebluealliance/api/v3/models/Match.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Match</a></li>
30
+
<li><ahref="com/thebluealliance/api/v3/requests/MatchRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">MatchRequest</a></li>
31
+
<li><ahref="com/thebluealliance/api/v3/models/Media.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Media</a></li>
32
+
<li><ahref="com/thebluealliance/api/v3/models/OPRs.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">OPRs</a></li>
33
+
<li><ahref="com/thebluealliance/api/v3/models/Ranking.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Ranking</a></li>
34
+
<li><ahref="com/thebluealliance/api/v3/models/Robot.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Robot</a></li>
35
+
<li><ahref="com/thebluealliance/api/v3/models/SimpleEvent.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">SimpleEvent</a></li>
36
+
<li><ahref="com/thebluealliance/api/v3/models/SimpleMatch.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">SimpleMatch</a></li>
37
+
<li><ahref="com/thebluealliance/api/v3/models/SimpleTeam.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">SimpleTeam</a></li>
38
+
<li><ahref="com/thebluealliance/api/v3/TBA.html" title="class in com.thebluealliance.api.v3" target="classFrame">TBA</a></li>
39
+
<li><ahref="com/thebluealliance/api/v3/models/Team.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Team</a></li>
40
+
<li><ahref="com/thebluealliance/api/v3/models/TeamEventStatus.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">TeamEventStatus</a></li>
41
+
<li><ahref="com/thebluealliance/api/v3/requests/TeamRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">TeamRequest</a></li>
42
+
<li><ahref="com/thebluealliance/api/v3/models/WLTRecord.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">WLTRecord</a></li>
<li><ahref="com/thebluealliance/api/v3/requests/APIResponse.html" title="class in com.thebluealliance.api.v3.requests">APIResponse</a></li>
16
+
<li><ahref="com/thebluealliance/api/v3/models/Award.html" title="class in com.thebluealliance.api.v3.models">Award</a></li>
17
+
<li><ahref="com/thebluealliance/api/v3/Constants.html" title="class in com.thebluealliance.api.v3">Constants</a></li>
18
+
<li><ahref="com/thebluealliance/api/v3/requests/DataRequest.html" title="class in com.thebluealliance.api.v3.requests">DataRequest</a></li>
19
+
<li><ahref="com/thebluealliance/api/v3/Deserializer.html" title="class in com.thebluealliance.api.v3">Deserializer</a></li>
20
+
<li><ahref="com/thebluealliance/api/v3/models/District.html" title="class in com.thebluealliance.api.v3.models">District</a></li>
21
+
<li><ahref="com/thebluealliance/api/v3/models/DistrictRanking.html" title="class in com.thebluealliance.api.v3.models">DistrictRanking</a></li>
22
+
<li><ahref="com/thebluealliance/api/v3/requests/DistrictRequest.html" title="class in com.thebluealliance.api.v3.requests">DistrictRequest</a></li>
23
+
<li><ahref="com/thebluealliance/api/v3/models/EliminationAlliance.html" title="class in com.thebluealliance.api.v3.models">EliminationAlliance</a></li>
24
+
<li><ahref="com/thebluealliance/api/v3/models/Event.html" title="class in com.thebluealliance.api.v3.models">Event</a></li>
25
+
<li><ahref="com/thebluealliance/api/v3/models/EventDistrictPoints.html" title="class in com.thebluealliance.api.v3.models">EventDistrictPoints</a></li>
26
+
<li><ahref="com/thebluealliance/api/v3/models/EventPoints.html" title="class in com.thebluealliance.api.v3.models">EventPoints</a></li>
27
+
<li><ahref="com/thebluealliance/api/v3/models/EventRankings.html" title="class in com.thebluealliance.api.v3.models">EventRankings</a></li>
28
+
<li><ahref="com/thebluealliance/api/v3/requests/EventRequest.html" title="class in com.thebluealliance.api.v3.requests">EventRequest</a></li>
29
+
<li><ahref="com/thebluealliance/api/v3/models/Match.html" title="class in com.thebluealliance.api.v3.models">Match</a></li>
30
+
<li><ahref="com/thebluealliance/api/v3/requests/MatchRequest.html" title="class in com.thebluealliance.api.v3.requests">MatchRequest</a></li>
31
+
<li><ahref="com/thebluealliance/api/v3/models/Media.html" title="class in com.thebluealliance.api.v3.models">Media</a></li>
32
+
<li><ahref="com/thebluealliance/api/v3/models/OPRs.html" title="class in com.thebluealliance.api.v3.models">OPRs</a></li>
33
+
<li><ahref="com/thebluealliance/api/v3/models/Ranking.html" title="class in com.thebluealliance.api.v3.models">Ranking</a></li>
34
+
<li><ahref="com/thebluealliance/api/v3/models/Robot.html" title="class in com.thebluealliance.api.v3.models">Robot</a></li>
35
+
<li><ahref="com/thebluealliance/api/v3/models/SimpleEvent.html" title="class in com.thebluealliance.api.v3.models">SimpleEvent</a></li>
36
+
<li><ahref="com/thebluealliance/api/v3/models/SimpleMatch.html" title="class in com.thebluealliance.api.v3.models">SimpleMatch</a></li>
37
+
<li><ahref="com/thebluealliance/api/v3/models/SimpleTeam.html" title="class in com.thebluealliance.api.v3.models">SimpleTeam</a></li>
38
+
<li><ahref="com/thebluealliance/api/v3/TBA.html" title="class in com.thebluealliance.api.v3">TBA</a></li>
39
+
<li><ahref="com/thebluealliance/api/v3/models/Team.html" title="class in com.thebluealliance.api.v3.models">Team</a></li>
40
+
<li><ahref="com/thebluealliance/api/v3/models/TeamEventStatus.html" title="class in com.thebluealliance.api.v3.models">TeamEventStatus</a></li>
41
+
<li><ahref="com/thebluealliance/api/v3/requests/TeamRequest.html" title="class in com.thebluealliance.api.v3.requests">TeamRequest</a></li>
42
+
<li><ahref="com/thebluealliance/api/v3/models/WLTRecord.html" title="class in com.thebluealliance.api.v3.models">WLTRecord</a></li>
0 commit comments