Updates for season 2022

This commit is contained in:
Julian Arndt
2021-07-19 15:05:48 +02:00
parent c959d62116
commit 2f0385f1f5
16 changed files with 251 additions and 84 deletions

View File

@@ -47,15 +47,15 @@ public class APIFootballUpdater {
}
}
public void updateAllFixtures() {
HashSet<Integer> leagues = getLeagues();
public void updateAllFixtures(int season) {
HashSet<Integer> leagues = getLeagues(season);
for (Integer league : leagues) {
updateFixtures(league);
}
}
public void updateAllRounds() {
HashSet<Integer> leagues = getLeagues();
public void updateAllRounds(int season) {
HashSet<Integer> leagues = getLeagues(season);
for (Integer league : leagues) {
updateRounds(league);
}
@@ -131,8 +131,8 @@ public class APIFootballUpdater {
return result.toString();
}
public HashSet<Integer> getLeagues() {
JSONArray leaguesArray = ResourceProvider.getLigenConfig();
public HashSet<Integer> getLeagues(int season) {
JSONArray leaguesArray = ResourceProvider.getLigenConfig(season);
HashSet<Integer> leagues = new HashSet<>();
for (Object leagueObject : leaguesArray) {
JSONObject leagueJSONObject = (JSONObject) leagueObject;