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

Commit f5261c2

Browse files
authored
Update README.md
1 parent 22a68ef commit f5261c2

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# The Blue Alliance API Java Library [![Build Status](https://travis-ci.org/spencerng/blue-alliance-api-java-library.svg?branch=master)](https://travis-ci.org/spencerng/blue-alliance-api-java-library)
1+
# The Blue Alliance API Java Library [![Build Status]https://travis-ci.org/RaiderRobotix/blue-alliance-api-java-library.svg?branch=master
22

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

5-
Full Javadoc documentation can be found [here](http://spencerng.github.io/blue-alliance-api-java-library/)
5+
Full Javadoc documentation can be found [here](http://raiderrobotix.github.io/blue-alliance-api-java-library/)
66

77
## Usage
88

@@ -21,32 +21,33 @@ Here is an example of retrieving an array of teams in the FIRST Mid-Atlantic dis
2121

2222
Team[] midAtlanticTeams = tba.districtRequest.getTeams("2017mar");
2323

24-
A list of request methods for each request object can be found [here](http://spencerng.github.io/blue-alliance-api-java-library/com/thebluealliance/api/v3/requests/package-summary.html).
24+
A list of request methods for each request object can be found [here](http://raiderrobotix.github.io/blue-alliance-api-java-library/com/thebluealliance/api/v3/requests/package-summary.html).
2525

2626
### Advanced Usage
2727

2828
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, String ifModifiedSince)` method](http://spencerng.github.io/blue-alliance-api-java-library/com/thebluealliance/api/v3/requests/DataRequest.html#getDataTBA-java.lang.String-java.lang.String-) in the [`DataRequest` class](http://spencerng.github.io/blue-alliance-api-java-library/com/thebluealliance/api/v3/requests/DataRequest.html). This will return an [`APIResponse`](http://spencerng.github.io/blue-alliance-api-java-library/com/thebluealliance/api/v3/requests/APIResponse.html) object with JSON data, the HTTP response code, and the `Last-Modified` header.
2929

3030
The JSON data will need to be deserialized into an object model with a method in the [`Deserializer` class](http://spencerng.github.io/blue-alliance-api-java-library/com/thebluealliance/api/v3/Deserializer.html) before being used.
3131

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.
32+
Here is an example of fetching the `Match` objects for the 2017 Mount Olive District Event, if they have been updated.
3333

3434
APIResponse resp = tba.dataRequest.getDataTBA("/event/2017njfla/matches");
3535
String lastModified = resp.getLastModified();
3636
Match[] matchList = Deserializer.toMatchArray(resp.getJson());
3737

38-
while(true){
39-
resp = tba.dataRequest.getDataTBA("/event/2017njfla/matches", lastModified);
38+
// Execute the following code block after waiting or in a separate method
39+
40+
resp = tba.dataRequest.getDataTBA("/event/2017njfla/matches", lastModified);
4041

41-
if(resp.getResponseCode()!=304){ // HTTP code 304 indicates no change
42-
teamList = Deserializer.jsonToTeamArray(resp.getJson());
43-
lastModified = resp.getLastModified();
42+
if(resp.getResponseCode()!=304){ // HTTP code 304 indicates no change
43+
teamList = Deserializer.jsonToTeamArray(resp.getJson());
44+
lastModified = resp.getLastModified();
4445
}
4546
}
4647

4748
## Models
4849

49-
A list of object model classes and their getter methods for instance variables can be found [here](http://spencerng.github.io/blue-alliance-api-java-library/com/thebluealliance/api/v3/models/package-summary.html)
50+
A list of object model classes and their getter methods for instance variables can be found [here](http://raiderrobotix.github.io/blue-alliance-api-java-library/com/thebluealliance/api/v3/models/package-summary.html). Please note that the `master` branch of this repository contains updated object models for the current season's code, and object models for past seasons can be found in other branches.
5051

5152
## Dependencies
5253

@@ -58,9 +59,7 @@ You will need [Gson](https://github.com/google/gson) to use the released compile
5859

5960
Note that you will need Gradle to compile this repository's source code if you do not get Gson.
6061

61-
## Examples
62-
6362

6463
## Contact
6564

66-
Feel free to contact me at sng1488@gmail.com or create a pull request if you have any questions, fixes, or suggestions.
65+
Feel free to contact Spencer Ng at sng1488 (at) gmail (dot) com or create a pull request if you have any questions, fixes, or suggestions.

0 commit comments

Comments
 (0)