Add support for EM Tippspiel
This commit is contained in:
@@ -10,6 +10,7 @@ public class APIFootballMatch extends BaseMatch {
|
||||
private final int leagueId;
|
||||
private final String teamNameHome;
|
||||
private final String teamNameGuest;
|
||||
private final String round;
|
||||
private Boolean showTable = null;
|
||||
|
||||
public APIFootballMatch(JSONObject json, int season) throws Exception {
|
||||
@@ -22,8 +23,9 @@ public class APIFootballMatch extends BaseMatch {
|
||||
this.teamNameGuest = ((JSONObject) json.get("awayTeam")).get("team_name").toString();
|
||||
this.goalsHome = getNumberOrNull(json.get("goalsHomeTeam"));
|
||||
this.goalsGuest = getNumberOrNull(json.get("goalsAwayTeam"));
|
||||
this.round = json.get("round").toString();
|
||||
try {
|
||||
this.matchday = getMatchdayFromRoundString(season, json.get("round").toString(), this.leagueId);
|
||||
this.matchday = getMatchdayFromRoundString(season, this.round, this.leagueId);
|
||||
} catch (Exception e) {
|
||||
throw new Exception("Did not find matchday for league '" + this.leagueId + "': '" + json.get("round").toString() + "'");
|
||||
}
|
||||
@@ -61,6 +63,10 @@ public class APIFootballMatch extends BaseMatch {
|
||||
return this.teamNameGuest;
|
||||
}
|
||||
|
||||
public String getRound() {
|
||||
return this.round;
|
||||
}
|
||||
|
||||
public void setShowTable(boolean showTable) {
|
||||
this.showTable = showTable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user