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

Commit f834958

Browse files
committed
Formatting
1 parent ae397ae commit f834958

31 files changed

Lines changed: 1381 additions & 1465 deletions

src/main/java/com/thebluealliance/api/v3/Deserializer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import com.thebluealliance.api.v3.requests.APIResponse;
66

77
/**
8-
* Collection of <code>static</code> methods to convert JSON data from the API into a model or an array of a model
9-
* found in {@linkplain com.thebluealliance.api.v3.models}
8+
* Collection of <code>static</code> methods to convert JSON data from the API into a model or an array of a model found in {@linkplain com.thebluealliance.api.v3.models}
109
*/
1110
public class Deserializer {
1211

src/main/java/com/thebluealliance/api/v3/TBA.java

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,49 @@
33
import com.thebluealliance.api.v3.requests.*;
44

55
/**
6-
* Base class used to access the The Blue Alliance API.
7-
* A TBA object must be created to use this client library.
6+
* Base class used to access the The Blue Alliance API. A TBA object must be created to use this client library.
87
*/
98
public class TBA {
109

11-
private static String AUTH_KEY;
12-
13-
/**
14-
* A {@link DataRequest} object to make direct calls to the API
15-
*/
16-
public final DataRequest dataRequest;
17-
18-
/**
19-
* A {@link TeamRequest} object to make calls in which a <code>teamNumber</code> is the primary argument
20-
*/
21-
public final TeamRequest teamRequest;
22-
23-
/**
24-
* An {@link EventRequest} object to make calls in which an <code>eventKey</code> is the primary argument
25-
*/
26-
public final EventRequest eventRequest;
27-
28-
/**
29-
* A {@link DistrictRequest} object to make calls in which a <code>districtKey</code> is the primary argument
30-
*/
31-
public final DistrictRequest districtRequest;
32-
33-
/**
34-
* A {@link MatchRequest} object to make calls in which a <code>matchKey</code> is the primary argument
35-
*/
36-
public final MatchRequest matchRequest;
37-
38-
/**
39-
* Create a TBA object to make API requests
40-
*
41-
* @param authKey The Read API Key, generated on your
42-
* <a href="https://www.thebluealliance.com/account">Account Dashboard</a> on The Blue Alliance
43-
*/
44-
public TBA(String authKey) {
45-
AUTH_KEY = authKey;
46-
dataRequest = new DataRequest(AUTH_KEY);
47-
teamRequest = new TeamRequest(dataRequest);
48-
eventRequest = new EventRequest(dataRequest);
49-
districtRequest = new DistrictRequest(dataRequest);
50-
matchRequest = new MatchRequest(dataRequest);
51-
}
52-
10+
private static String AUTH_KEY;
11+
12+
/**
13+
* A {@link DataRequest} object to make direct calls to the API
14+
*/
15+
public final DataRequest dataRequest;
16+
17+
/**
18+
* A {@link TeamRequest} object to make calls in which a <code>teamNumber</code> is the primary argument
19+
*/
20+
public final TeamRequest teamRequest;
21+
22+
/**
23+
* An {@link EventRequest} object to make calls in which an <code>eventKey</code> is the primary argument
24+
*/
25+
public final EventRequest eventRequest;
26+
27+
/**
28+
* A {@link DistrictRequest} object to make calls in which a <code>districtKey</code> is the primary argument
29+
*/
30+
public final DistrictRequest districtRequest;
31+
32+
/**
33+
* A {@link MatchRequest} object to make calls in which a <code>matchKey</code> is the primary argument
34+
*/
35+
public final MatchRequest matchRequest;
36+
37+
/**
38+
* Create a TBA object to make API requests
39+
*
40+
* @param authKey The Read API Key, generated on your <a href="https://www.thebluealliance.com/account">Account Dashboard</a> on The Blue Alliance
41+
*/
42+
public TBA(String authKey) {
43+
AUTH_KEY = authKey;
44+
dataRequest = new DataRequest(AUTH_KEY);
45+
teamRequest = new TeamRequest(dataRequest);
46+
eventRequest = new EventRequest(dataRequest);
47+
districtRequest = new DistrictRequest(dataRequest);
48+
matchRequest = new MatchRequest(dataRequest);
49+
}
5350

5451
}
Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,58 @@
11
package com.thebluealliance.api.v3.models;
22

3-
43
import lombok.Value;
54

65
/**
7-
* A <code>Award</code> object represents an award won at a FIRST Robotics Competition event and its associated
8-
* descriptors.
6+
* A <code>Award</code> object represents an award won at a FIRST Robotics Competition event and its associated descriptors.
97
*/
10-
@Value public class Award {
8+
@Value
9+
public class Award {
1110

12-
/**
13-
* The name of the award as provided by FIRST. May vary for the same award type.
14-
*/
11+
/**
12+
* The name of the award as provided by FIRST. May vary for the same award type.
13+
*/
1514
String name;
1615

1716
/**
18-
* The <code>event_key</code> of the event the award was won at.
19-
*/
17+
* The <code>event_key</code> of the event the award was won at.
18+
*/
2019
String event_key;
2120

2221
/**
23-
* @return Integer representing the type of award given.
24-
* @see <a href="https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/award_type.py#L6">award_type.py</a>
25-
*/
26-
int award_type;
22+
* @return Integer representing the type of award given.
23+
* @see <a href="https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/award_type.py#L6">award_type.py</a>
24+
*/
25+
int award_type;
2726

2827
/**
29-
* @return The year this award was won.
30-
*/
31-
int year;
28+
* @return The year this award was won.
29+
*/
30+
int year;
3231

3332
/**
34-
* @return A list of recipients of the award at the event.
35-
*/
36-
AwardRecipient[] recipient_list;
33+
* @return A list of recipients of the award at the event.
34+
*/
35+
AwardRecipient[] recipient_list;
3736

3837
/**
39-
* An <code>AwardRecipient</code> object represents the team and/or person who received an award at an event.
40-
*/
41-
public AwardRecipient[] getRecipientList() {
42-
return recipient_list;
43-
}
44-
45-
46-
@Value public class AwardRecipient {
47-
48-
/**
49-
* @return The TBA team key for the team that was given the award. May be <code>null</code>.
50-
*/
51-
String team_key;
52-
53-
/**
54-
* @return The name of the individual given the award. May be <code>null</code>.
55-
*/
56-
String awardee;
57-
}
38+
* An <code>AwardRecipient</code> object represents the team and/or person who received an award at an event.
39+
*/
40+
public AwardRecipient[] getRecipientList() {
41+
return recipient_list;
42+
}
43+
44+
@Value
45+
public class AwardRecipient {
46+
47+
/**
48+
* @return The TBA team key for the team that was given the award. May be <code>null</code>.
49+
*/
50+
String team_key;
51+
52+
/**
53+
* @return The name of the individual given the award. May be <code>null</code>.
54+
*/
55+
String awardee;
56+
}
5857

5958
}

src/main/java/com/thebluealliance/api/v3/models/District.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@
55
/**
66
* A <code>District</code> object represents a district for a particular year
77
*/
8-
@Value public class District {
8+
@Value
9+
public class District {
910

1011
/**
11-
* @return The short identifier for the district.
12-
*/
13-
String abbreviation;
12+
* @return The short identifier for the district.
13+
*/
14+
String abbreviation;
1415

1516
/**
16-
* @return The long name for the district.
17-
*/
18-
String display_name;
17+
* @return The long name for the district.
18+
*/
19+
String display_name;
1920

2021
/**
21-
* @return Key for this district, e.g. <code>2016ne</code>.
22-
*/
23-
String key;
22+
* @return Key for this district, e.g. <code>2016ne</code>.
23+
*/
24+
String key;
2425

2526
/**
26-
* @return Year this district participated.
27-
*/
28-
int year;
27+
* @return Year this district participated.
28+
*/
29+
int year;
2930
}

src/main/java/com/thebluealliance/api/v3/models/DistrictRanking.java

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,32 @@
55
/**
66
* Rank of a {@link Team} in a district.
77
*/
8-
@Value public class DistrictRanking {
8+
@Value
9+
public class DistrictRanking {
910

1011
/**
11-
* @return TBA team key for the team.
12-
*/
13-
String team_key;
12+
* @return TBA team key for the team.
13+
*/
14+
String team_key;
1415

1516
/**
16-
* @return Numerical rank of the team, 1 being top rank.
17-
*/
18-
int rank;
17+
* @return Numerical rank of the team, 1 being top rank.
18+
*/
19+
int rank;
1920

2021
/**
21-
* @return Any points added to a team as a result of the rookie bonus.
22-
*/
23-
int rookie_bonus;
22+
* @return Any points added to a team as a result of the rookie bonus.
23+
*/
24+
int rookie_bonus;
2425

2526
/**
26-
* @return Total district points for the team.
27-
*/
28-
int point_total;
27+
* @return Total district points for the team.
28+
*/
29+
int point_total;
2930

3031
/**
31-
* @return List of events and their associated points that contributed to the point total for the team.
32-
*/
33-
EventPoints[] event_points;
32+
* @return List of events and their associated points that contributed to the point total for the team.
33+
*/
34+
EventPoints[] event_points;
3435

3536
}

0 commit comments

Comments
 (0)