Skip to content
This repository was archived by the owner on Oct 28, 2025. It is now read-only.

Commit c8fd4e7

Browse files
committed
Javadoc update
1 parent 9c615c9 commit c8fd4e7

154 files changed

Lines changed: 29677 additions & 811 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Java client library to retrieve data from The Blue Alliance using TBA API v3
44

5-
The library is essentially complete, but documentation is in progress.
5+
Full Javadoc documentation can be found [here](/docs/)
66

77
## Usage
88

@@ -13,59 +13,40 @@ Begin by creating a TBA object with your Read TBA API Key. This can be found or
1313

1414
### Regular Usage
1515

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).
1717

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).
1919

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:
2521

26-
**`tba.eventRequest`**
22+
Team[] midAtlanticTeams = tba.districtRequest.getTeams("2017mar");
2723

28-
* to be continued
29-
30-
**`tba.districtRequest`**
31-
32-
* to be continued
33-
34-
**`tba.matchRequest`**
35-
36-
* to be continued
24+
A list of request methods for each request object can be found [here](/docs/com/thebluealliance/api/v3/requests/package-summary.html).
3725

3826
### Advance Usage
3927

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.
4129

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.
4331

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.
4533

46-
TBA tba = new TBA(authKey);
47-
APIResponse resp = tba.dataRequest.getDataTBA("/event/2017njfla/teams");
34+
APIResponse resp = tba.dataRequest.getDataTBA("/event/2017njfla/matches");
4835
String lastModified = resp.getLastModified();
49-
Team[] teamList = Deserializer.toTeamArray(resp.getJson());
50-
while(true){
51-
resp = tba.dataRequest.getDataTBA("/event/2017njfla/teams", lastModified);
52-
if(resp.getResponseCode()!=304){
53-
teamList = Deserializer.jsonToTeamArray(resp.getJson());
54-
lastModified = resp.getLastModified();
55-
}
56-
}
36+
Match[] matchList = Deserializer.toMatchArray(resp.getJson());
5737

58-
## Models
38+
while(true){
39+
resp = tba.dataRequest.getDataTBA("/event/2017njfla/matches", lastModified);
5940

60-
Most of the object models follow those on The Blue Alliance API documentation, with appropriately named getter methods:
41+
if(resp.getResponseCode()!=304){ // HTTP code 304 indicates no change
42+
teamList = Deserializer.jsonToTeamArray(resp.getJson());
43+
lastModified = resp.getLastModified();
44+
}
45+
}
6146

62-
**Award**
47+
## Models
6348

64-
* `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)
6950

7051
## Contact
7152

docs/allclasses-frame.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_121) on Fri Jun 30 16:29:27 EDT 2017 -->
6+
<title>All Classes</title>
7+
<meta name="date" content="2017-06-30">
8+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
9+
<script type="text/javascript" src="script.js"></script>
10+
</head>
11+
<body>
12+
<h1 class="bar">All&nbsp;Classes</h1>
13+
<div class="indexContainer">
14+
<ul>
15+
<li><a href="com/thebluealliance/api/v3/requests/APIResponse.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">APIResponse</a></li>
16+
<li><a href="com/thebluealliance/api/v3/models/Award.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Award</a></li>
17+
<li><a href="com/thebluealliance/api/v3/Constants.html" title="class in com.thebluealliance.api.v3" target="classFrame">Constants</a></li>
18+
<li><a href="com/thebluealliance/api/v3/requests/DataRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">DataRequest</a></li>
19+
<li><a href="com/thebluealliance/api/v3/Deserializer.html" title="class in com.thebluealliance.api.v3" target="classFrame">Deserializer</a></li>
20+
<li><a href="com/thebluealliance/api/v3/models/District.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">District</a></li>
21+
<li><a href="com/thebluealliance/api/v3/models/DistrictRanking.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">DistrictRanking</a></li>
22+
<li><a href="com/thebluealliance/api/v3/requests/DistrictRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">DistrictRequest</a></li>
23+
<li><a href="com/thebluealliance/api/v3/models/EliminationAlliance.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">EliminationAlliance</a></li>
24+
<li><a href="com/thebluealliance/api/v3/models/Event.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Event</a></li>
25+
<li><a href="com/thebluealliance/api/v3/models/EventDistrictPoints.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">EventDistrictPoints</a></li>
26+
<li><a href="com/thebluealliance/api/v3/models/EventPoints.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">EventPoints</a></li>
27+
<li><a href="com/thebluealliance/api/v3/models/EventRankings.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">EventRankings</a></li>
28+
<li><a href="com/thebluealliance/api/v3/requests/EventRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">EventRequest</a></li>
29+
<li><a href="com/thebluealliance/api/v3/models/Match.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Match</a></li>
30+
<li><a href="com/thebluealliance/api/v3/requests/MatchRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">MatchRequest</a></li>
31+
<li><a href="com/thebluealliance/api/v3/models/Media.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Media</a></li>
32+
<li><a href="com/thebluealliance/api/v3/models/OPRs.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">OPRs</a></li>
33+
<li><a href="com/thebluealliance/api/v3/models/Ranking.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Ranking</a></li>
34+
<li><a href="com/thebluealliance/api/v3/models/Robot.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Robot</a></li>
35+
<li><a href="com/thebluealliance/api/v3/models/SimpleEvent.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">SimpleEvent</a></li>
36+
<li><a href="com/thebluealliance/api/v3/models/SimpleMatch.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">SimpleMatch</a></li>
37+
<li><a href="com/thebluealliance/api/v3/models/SimpleTeam.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">SimpleTeam</a></li>
38+
<li><a href="com/thebluealliance/api/v3/TBA.html" title="class in com.thebluealliance.api.v3" target="classFrame">TBA</a></li>
39+
<li><a href="com/thebluealliance/api/v3/models/Team.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">Team</a></li>
40+
<li><a href="com/thebluealliance/api/v3/models/TeamEventStatus.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">TeamEventStatus</a></li>
41+
<li><a href="com/thebluealliance/api/v3/requests/TeamRequest.html" title="class in com.thebluealliance.api.v3.requests" target="classFrame">TeamRequest</a></li>
42+
<li><a href="com/thebluealliance/api/v3/models/WLTRecord.html" title="class in com.thebluealliance.api.v3.models" target="classFrame">WLTRecord</a></li>
43+
</ul>
44+
</div>
45+
</body>
46+
</html>

docs/allclasses-noframe.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_121) on Fri Jun 30 16:29:27 EDT 2017 -->
6+
<title>All Classes</title>
7+
<meta name="date" content="2017-06-30">
8+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
9+
<script type="text/javascript" src="script.js"></script>
10+
</head>
11+
<body>
12+
<h1 class="bar">All&nbsp;Classes</h1>
13+
<div class="indexContainer">
14+
<ul>
15+
<li><a href="com/thebluealliance/api/v3/requests/APIResponse.html" title="class in com.thebluealliance.api.v3.requests">APIResponse</a></li>
16+
<li><a href="com/thebluealliance/api/v3/models/Award.html" title="class in com.thebluealliance.api.v3.models">Award</a></li>
17+
<li><a href="com/thebluealliance/api/v3/Constants.html" title="class in com.thebluealliance.api.v3">Constants</a></li>
18+
<li><a href="com/thebluealliance/api/v3/requests/DataRequest.html" title="class in com.thebluealliance.api.v3.requests">DataRequest</a></li>
19+
<li><a href="com/thebluealliance/api/v3/Deserializer.html" title="class in com.thebluealliance.api.v3">Deserializer</a></li>
20+
<li><a href="com/thebluealliance/api/v3/models/District.html" title="class in com.thebluealliance.api.v3.models">District</a></li>
21+
<li><a href="com/thebluealliance/api/v3/models/DistrictRanking.html" title="class in com.thebluealliance.api.v3.models">DistrictRanking</a></li>
22+
<li><a href="com/thebluealliance/api/v3/requests/DistrictRequest.html" title="class in com.thebluealliance.api.v3.requests">DistrictRequest</a></li>
23+
<li><a href="com/thebluealliance/api/v3/models/EliminationAlliance.html" title="class in com.thebluealliance.api.v3.models">EliminationAlliance</a></li>
24+
<li><a href="com/thebluealliance/api/v3/models/Event.html" title="class in com.thebluealliance.api.v3.models">Event</a></li>
25+
<li><a href="com/thebluealliance/api/v3/models/EventDistrictPoints.html" title="class in com.thebluealliance.api.v3.models">EventDistrictPoints</a></li>
26+
<li><a href="com/thebluealliance/api/v3/models/EventPoints.html" title="class in com.thebluealliance.api.v3.models">EventPoints</a></li>
27+
<li><a href="com/thebluealliance/api/v3/models/EventRankings.html" title="class in com.thebluealliance.api.v3.models">EventRankings</a></li>
28+
<li><a href="com/thebluealliance/api/v3/requests/EventRequest.html" title="class in com.thebluealliance.api.v3.requests">EventRequest</a></li>
29+
<li><a href="com/thebluealliance/api/v3/models/Match.html" title="class in com.thebluealliance.api.v3.models">Match</a></li>
30+
<li><a href="com/thebluealliance/api/v3/requests/MatchRequest.html" title="class in com.thebluealliance.api.v3.requests">MatchRequest</a></li>
31+
<li><a href="com/thebluealliance/api/v3/models/Media.html" title="class in com.thebluealliance.api.v3.models">Media</a></li>
32+
<li><a href="com/thebluealliance/api/v3/models/OPRs.html" title="class in com.thebluealliance.api.v3.models">OPRs</a></li>
33+
<li><a href="com/thebluealliance/api/v3/models/Ranking.html" title="class in com.thebluealliance.api.v3.models">Ranking</a></li>
34+
<li><a href="com/thebluealliance/api/v3/models/Robot.html" title="class in com.thebluealliance.api.v3.models">Robot</a></li>
35+
<li><a href="com/thebluealliance/api/v3/models/SimpleEvent.html" title="class in com.thebluealliance.api.v3.models">SimpleEvent</a></li>
36+
<li><a href="com/thebluealliance/api/v3/models/SimpleMatch.html" title="class in com.thebluealliance.api.v3.models">SimpleMatch</a></li>
37+
<li><a href="com/thebluealliance/api/v3/models/SimpleTeam.html" title="class in com.thebluealliance.api.v3.models">SimpleTeam</a></li>
38+
<li><a href="com/thebluealliance/api/v3/TBA.html" title="class in com.thebluealliance.api.v3">TBA</a></li>
39+
<li><a href="com/thebluealliance/api/v3/models/Team.html" title="class in com.thebluealliance.api.v3.models">Team</a></li>
40+
<li><a href="com/thebluealliance/api/v3/models/TeamEventStatus.html" title="class in com.thebluealliance.api.v3.models">TeamEventStatus</a></li>
41+
<li><a href="com/thebluealliance/api/v3/requests/TeamRequest.html" title="class in com.thebluealliance.api.v3.requests">TeamRequest</a></li>
42+
<li><a href="com/thebluealliance/api/v3/models/WLTRecord.html" title="class in com.thebluealliance.api.v3.models">WLTRecord</a></li>
43+
</ul>
44+
</div>
45+
</body>
46+
</html>

0 commit comments

Comments
 (0)