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

@@ -8,7 +8,7 @@ public class TeamIDMatcherTemplateCreator {
APIFootballConnector con;
JSONArray teams;
public TeamIDMatcherTemplateCreator(int season, int league) {
public TeamIDMatcherTemplateCreator(int season, int league) throws Exception {
this.con = APIFootballConnector.getAPIFootballConnectorInstance(season);
JSONObject apiObject = con.getTeamsForLeague(league);
JSONObject teamsObject = (JSONObject) apiObject.get("api");