11package com .thebluealliance .api .v3 .requests ;
22
3+ import java .io .IOException ;
4+
35import com .thebluealliance .api .v3 .Deserializer ;
46import com .thebluealliance .api .v3 .models .*;
57
@@ -20,8 +22,9 @@ public EventRequest(DataRequest tba){
2022 *
2123 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
2224 * @return The {@link Event} object referenced by the given key
25+ * @throws IOException
2326 */
24- public Event getEvent (String eventKey ){
27+ public Event getEvent (String eventKey ) throws IOException {
2528 String directory = "/event/" + eventKey ;
2629 return Deserializer .toEvent (tba
2730 .getDataTBA (directory ).getJson ());
@@ -31,8 +34,9 @@ public Event getEvent(String eventKey){
3134 *
3235 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
3336 * @return The {@link SimpleEvent} object referenced by the given key
37+ * @throws IOException
3438 */
35- public SimpleEvent getSimpleEvent (String eventKey ){
39+ public SimpleEvent getSimpleEvent (String eventKey ) throws IOException {
3640 String directory = "/event/" + eventKey + "/simple" ;
3741 return Deserializer .toSimpleEvent (tba
3842 .getDataTBA (directory ).getJson ());
@@ -42,8 +46,9 @@ public SimpleEvent getSimpleEvent(String eventKey){
4246 *
4347 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
4448 * @return A list of {@link Team} objects that competed in the given event.
49+ * @throws IOException
4550 */
46- public Team [] getTeams (String eventKey ){
51+ public Team [] getTeams (String eventKey ) throws IOException {
4752 String directory = "/event/" + eventKey +"/teams" ;
4853 return Deserializer .toTeamArray (tba
4954 .getDataTBA (directory ).getJson ());
@@ -53,9 +58,10 @@ public Team[] getTeams(String eventKey){
5358 *
5459 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
5560 * @return A list of {@link SimpleTeam} objects that competed in the given event.
61+ * @throws IOException
5662 */
5763
58- public SimpleTeam [] getSimpleTeams (String eventKey ){
64+ public SimpleTeam [] getSimpleTeams (String eventKey ) throws IOException {
5965 String directory = "/event/" + eventKey +"/teams/simple" ;
6066 return Deserializer .toSimpleTeamArray (tba
6167 .getDataTBA (directory ).getJson ());
@@ -65,9 +71,10 @@ public SimpleTeam[] getSimpleTeams(String eventKey){
6571 *
6672 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
6773 * @return A list of {@link Team} keys that competed in the given event.
74+ * @throws IOException
6875 */
6976
70- public String [] getTeamKeys (String eventKey ){
77+ public String [] getTeamKeys (String eventKey ) throws IOException {
7178 String directory = "/event/" + eventKey +"/teams/keys" ;
7279 return Deserializer .toStringArray (tba
7380 .getDataTBA (directory ).getJson ());
@@ -77,9 +84,10 @@ public String[] getTeamKeys(String eventKey){
7784 *
7885 * @param year Competition year (or season). Must be four digits.
7986 * @return A list of {@link Event} objects that occurred in a given year
87+ * @throws IOException
8088 */
8189
82- public Event [] getEvents (int year ){
90+ public Event [] getEvents (int year ) throws IOException {
8391 String directory = "/events/" +year ;
8492 return Deserializer .toEventArray (tba
8593 .getDataTBA (directory ).getJson ());
@@ -89,8 +97,9 @@ public Event[] getEvents(int year){
8997 *
9098 * @param year Competition year (or season). Must be four digits.
9199 * @return A list of {@link SimpleEvent} objects that occurred in a given year
100+ * @throws IOException
92101 */
93- public SimpleEvent [] getSimpleEvents (int year ){
102+ public SimpleEvent [] getSimpleEvents (int year ) throws IOException {
94103 String directory = "/events/" +year +"/simple" ;
95104 return Deserializer .toSimpleEventArray (tba
96105 .getDataTBA (directory ).getJson ());
@@ -100,8 +109,9 @@ public SimpleEvent[] getSimpleEvents(int year){
100109 *
101110 * @param year Competition year (or season). Must be four digits.
102111 * @return A list of {@link Event} keys that occurred in a given year
112+ * @throws IOException
103113 */
104- public String [] getEventKeys (int year ){
114+ public String [] getEventKeys (int year ) throws IOException {
105115 String directory = "/event/" +year +"/keys" ;
106116 return Deserializer .toStringArray (tba
107117 .getDataTBA (directory ).getJson ());
@@ -111,8 +121,9 @@ public String[] getEventKeys(int year){
111121 *
112122 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
113123 * @return A list of team rankings for the event
124+ * @throws IOException
114125 */
115- public EventDistrictPoints getDistrictPoints (String eventKey ){
126+ public EventDistrictPoints getDistrictPoints (String eventKey ) throws IOException {
116127 String directory = "/event/" +eventKey +"/district_points" ;
117128 return Deserializer .toEventDistrictPoints (tba
118129 .getDataTBA (directory ).getJson ());
@@ -122,8 +133,9 @@ public EventDistrictPoints getDistrictPoints(String eventKey){
122133 *
123134 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
124135 * @return A list of {@link EliminationAlliance}s for the event
136+ * @throws IOException
125137 */
126- public EliminationAlliance [] getAlliances (String eventKey ){
138+ public EliminationAlliance [] getAlliances (String eventKey ) throws IOException {
127139 String directory = "/event/" +eventKey +"/alliances" ;
128140 return Deserializer .toEliminationAllianceArray (tba
129141 .getDataTBA (directory ).getJson ());
@@ -133,8 +145,9 @@ public EliminationAlliance[] getAlliances(String eventKey){
133145 *
134146 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
135147 * @return A set of {@link OPRs} (includeing OPR, DPR, and CCWM) for the event
148+ * @throws IOException
136149 */
137- public OPRs getOPRs (String eventKey ){
150+ public OPRs getOPRs (String eventKey ) throws IOException {
138151 String directory = "/event/" +eventKey +"/oprs" ;
139152 return Deserializer .toOPRs (tba
140153 .getDataTBA (directory ).getJson ());
@@ -144,8 +157,9 @@ public OPRs getOPRs(String eventKey){
144157 *
145158 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
146159 * @return A list of team rankings for the event
160+ * @throws IOException
147161 */
148- public EventRankings getRankings (String eventKey ){
162+ public EventRankings getRankings (String eventKey ) throws IOException {
149163 String directory = "/event/" +eventKey +"/rankings" ;
150164 return Deserializer .toEventRankings (tba
151165 .getDataTBA (directory ).getJson ());
@@ -155,8 +169,9 @@ public EventRankings getRankings(String eventKey){
155169 *
156170 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
157171 * @return A list of {@link Match}es for the event
172+ * @throws IOException
158173 */
159- public Match [] getMatches (String eventKey ){
174+ public Match [] getMatches (String eventKey ) throws IOException {
160175 String directory = "/event/" + eventKey + "/matches" ;
161176 return Deserializer .toMatchArray (tba
162177 .getDataTBA (directory )
@@ -167,8 +182,9 @@ public Match[] getMatches(String eventKey){
167182 *
168183 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
169184 * @return A list of {@link SimpleMatch}es for the event
185+ * @throws IOException
170186 */
171- public SimpleMatch [] getSimpleMatches (String eventKey ){
187+ public SimpleMatch [] getSimpleMatches (String eventKey ) throws IOException {
172188 String directory = "/event/" + eventKey + "/matches/simple" ;
173189 return Deserializer .toSimpleMatchArray (tba
174190 .getDataTBA (directory )
@@ -179,8 +195,9 @@ public SimpleMatch[] getSimpleMatches(String eventKey){
179195 *
180196 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
181197 * @return A list of match keys for the event
198+ * @throws IOException
182199 */
183- public String [] getMatchKeys (String eventKey ){
200+ public String [] getMatchKeys (String eventKey ) throws IOException {
184201 String directory = "/event/" + eventKey +"/matches/keys" ;
185202 return Deserializer .toStringArray (tba
186203 .getDataTBA (directory )
@@ -191,8 +208,9 @@ public String[] getMatchKeys(String eventKey){
191208 *
192209 * @param eventKey TBA Event Key, e.g. <code>2016nytr</code>
193210 * @return A list of {@link Award}s from the given the event
211+ * @throws IOException
194212 */
195- public Award [] getAwards (String eventKey ){
213+ public Award [] getAwards (String eventKey ) throws IOException {
196214 String directory = "/event/" + eventKey +"/awards" ;
197215 return Deserializer .toAwardArray (tba
198216 .getDataTBA (directory )
0 commit comments