Add check for wrong endpoint for APIFootball

This commit is contained in:
2020-11-09 22:03:20 +01:00
parent 5474e2a4d1
commit c53511939d
5 changed files with 16 additions and 11 deletions

View File

@@ -80,7 +80,7 @@ public class APIFootballConnector {
return this.rounds.get(leagueId);
}
public JSONObject getTeamsForLeague(int league) {
public JSONObject getTeamsForLeague(int league) throws Exception {
String url = "https://v2.api-football.com/teams/league/" + league;
String content = new APIFootballUpdater().getRawData(url);
return stringToJSONObject(content);