Add api football files updater

This commit is contained in:
2020-10-07 22:14:13 +02:00
parent bce0f3800c
commit f22f9a929b
18 changed files with 15808 additions and 1048 deletions

View File

@@ -91,80 +91,4 @@ public class APIFootballConnector {
return object; return object;
} }
private JSONArray getDataAsJSONArray(String requestUrl) {
String rawData = getRawData(requestUrl);
JSONParser parser = new JSONParser();
JSONArray data = null;
try {
data = (JSONArray) parser.parse(rawData);
} catch (ParseException e) {
/* TODO */
e.printStackTrace();
}
return data;
}
private JSONObject getDataAsJSONObject(String requestUrl) {
String rawData = getRawData(requestUrl);
JSONParser parser = new JSONParser();
JSONObject data = null;
try {
data = (JSONObject) parser.parse(rawData);
} catch (ParseException e) {
/* TODO */
e.printStackTrace();
}
return data;
}
String getRawData(String requestUrl) {
HttpClient client = HttpClientBuilder.create().build();
HttpGet request = new HttpGet(requestUrl);
// add request header
request.addHeader("Content-Type", "application/json");
HttpResponse response = null;
try {
response = client.execute(request);
} catch (ClientProtocolException e) {
/* TODO */
e.printStackTrace();
} catch (IOException e) {
/* TODO */
e.printStackTrace();
}
BufferedReader rd = null;
try {
rd = new BufferedReader(
new InputStreamReader(response.getEntity().getContent())
);
} catch (IOException e) {
/* TODO */
e.printStackTrace();
}
StringBuilder result = new StringBuilder();
String line = "";
while (true) {
try {
line = rd.readLine();
} catch (IOException e) {
/* TODO */
e.printStackTrace();
}
// Stop reading if last line was found.
if (line == null) break;
result.append(line);
}
return result.toString();
}
} }

View File

@@ -17,6 +17,8 @@ public class APIFootballMatch extends BaseMatch {
private int matchId; private int matchId;
private int leagueId; private int leagueId;
private String matchStatus; private String matchStatus;
private String teamNameHome;
private String teamNameGuest;
public APIFootballMatch(JSONObject json, int season) { public APIFootballMatch(JSONObject json, int season) {
this.season = season; this.season = season;
@@ -25,6 +27,8 @@ public class APIFootballMatch extends BaseMatch {
this.leagueId = Integer.parseInt(json.get("league_id").toString()); this.leagueId = Integer.parseInt(json.get("league_id").toString());
this.teamIdHome = Integer.parseInt(((JSONObject) json.get("homeTeam")).get("team_id").toString()); this.teamIdHome = Integer.parseInt(((JSONObject) json.get("homeTeam")).get("team_id").toString());
this.teamIdGuest = Integer.parseInt(((JSONObject) json.get("awayTeam")).get("team_id").toString()); this.teamIdGuest = Integer.parseInt(((JSONObject) json.get("awayTeam")).get("team_id").toString());
this.teamNameHome = ((JSONObject) json.get("homeTeam")).get("team_name").toString();
this.teamNameGuest = ((JSONObject) json.get("awayTeam")).get("team_name").toString();
this.goalsHome = getNumberOrNull(json.get("goalsHomeTeam")); this.goalsHome = getNumberOrNull(json.get("goalsHomeTeam"));
this.goalsGuest = getNumberOrNull(json.get("goalsAwayTeam")); this.goalsGuest = getNumberOrNull(json.get("goalsAwayTeam"));
this.matchday = getMatchdayFromRoundString(json.get("round").toString(), this.leagueId); this.matchday = getMatchdayFromRoundString(json.get("round").toString(), this.leagueId);
@@ -73,4 +77,12 @@ public class APIFootballMatch extends BaseMatch {
private Integer getNumberOrNull(Object object) { private Integer getNumberOrNull(Object object) {
return object != null ? Integer.parseInt(object.toString()) : null; return object != null ? Integer.parseInt(object.toString()) : null;
} }
public String getTeamNameHome() {
return this.teamNameHome;
}
public String getTeamNameGuest() {
return this.teamNameGuest;
}
} }

View File

@@ -0,0 +1,158 @@
package de.jeyp91.apifootball;
import com.google.common.io.Resources;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import java.io.BufferedReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
public class APIFootballUpdater {
private int season;
public APIFootballUpdater(int season) {
this.season = season;
}
public void updateFixtures(int league) throws IOException {
String apiFootballUrl = "https://v2.api-football.com/fixtures/league/" + league + "?timezone=Europe/Berlin";
String content = getRawData(apiFootballUrl);
String resourcePath = this.season + "/API-Football/matches_league_" + league + ".json";
writeStringToFile(content, resourcePath);
}
public void updateAllFixtures(String configPath) throws IOException {
HashSet<Integer> leagues = getAllLeaguesFromLeagueConfig(configPath);
for (Integer league : leagues) {
updateFixtures(league);
}
}
private HashSet<Integer> getAllLeaguesFromLeagueConfig(String configPath) {
HashSet<Integer> leagues = new HashSet<>();
JSONParser jsonParser = new JSONParser();
URL url = Resources.getResource(season + "\\" + configPath);
String jsonConfig = null;
JSONObject configObject = null;
try {
jsonConfig = Resources.toString(url, StandardCharsets.UTF_8);
configObject = (JSONObject) jsonParser.parse(jsonConfig);
} catch (IOException | ParseException e) {
e.printStackTrace();
}
JSONArray matchdayConfigs = (JSONArray) configObject.get("matchdayConfig");
for (Object matchdayConfig : matchdayConfigs) {
JSONArray matchesConfig = (JSONArray) ((JSONObject) matchdayConfig).get("matchesConfig");
for (Object matchConfig : matchesConfig) {
if (((JSONObject) matchConfig).containsKey("matchesLeague")) {
int league = Integer.parseInt(((JSONObject) matchConfig).get("matchesLeague").toString());
leagues.add(league);
}
if (((JSONObject) matchConfig).containsKey("matchLeague")) {
int league = Integer.parseInt(((JSONObject) matchConfig).get("matchLeague").toString());
leagues.add(league);
}
}
}
return leagues;
}
private void writeStringToFile(String content, String resourcePath) throws IOException {
URL url = Resources.getResource(resourcePath);
FileWriter myWriter = new FileWriter(url.getPath());
myWriter.write(content);
myWriter.close();
}
private JSONArray getDataAsJSONArray(String requestUrl) {
String rawData = getRawData(requestUrl);
JSONParser parser = new JSONParser();
JSONArray data = null;
try {
data = (JSONArray) parser.parse(rawData);
} catch (ParseException e) {
/* TODO */
e.printStackTrace();
}
return data;
}
private JSONObject getDataAsJSONObject(String requestUrl) {
String rawData = getRawData(requestUrl);
JSONParser parser = new JSONParser();
JSONObject data = null;
try {
data = (JSONObject) parser.parse(rawData);
} catch (ParseException e) {
/* TODO */
e.printStackTrace();
}
return data;
}
String getRawData(String requestUrl) {
HttpClient client = HttpClientBuilder.create().build();
HttpGet request = new HttpGet(requestUrl);
// add request header
request.addHeader("X-RapidAPI-Key", "a607e6a7437d9d52f3ac73e0b2704d0b");
HttpResponse response = null;
try {
response = client.execute(request);
} catch (ClientProtocolException e) {
/* TODO */
e.printStackTrace();
} catch (IOException e) {
/* TODO */
e.printStackTrace();
}
BufferedReader rd = null;
try {
rd = new BufferedReader(
new InputStreamReader(response.getEntity().getContent())
);
} catch (IOException e) {
/* TODO */
e.printStackTrace();
}
StringBuilder result = new StringBuilder();
String line = "";
while (true) {
try {
line = rd.readLine();
} catch (IOException e) {
/* TODO */
e.printStackTrace();
}
// Stop reading if last line was found.
if (line == null) break;
result.append(line);
}
return result.toString();
}
}

View File

@@ -110,8 +110,8 @@ public class TLWMatch extends BaseMatch{
this.league = league; this.league = league;
this.matchday = matchday; this.matchday = matchday;
this.matchNo = matchNo; this.matchNo = matchNo;
this.teamIdHome = TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch.getTeamIdHome()); this.teamIdHome = this.getTeamIdHomeFromApiFootballMatch(apiFootballMatch);
this.teamIdGuest = TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch.getTeamIdGuest()); this.teamIdGuest = this.getTeamIdGuestFromApiFootballMatch(apiFootballMatch);
this.goalsHome = apiFootballMatch.getGoalsHome(); this.goalsHome = apiFootballMatch.getGoalsHome();
this.goalsGuest = apiFootballMatch.getGoalsGuest(); this.goalsGuest = apiFootballMatch.getGoalsGuest();
this.matchDatetime = apiFootballMatch.getMatchDateTime().replace("T", " ").substring(0, 19); this.matchDatetime = apiFootballMatch.getMatchDateTime().replace("T", " ").substring(0, 19);
@@ -270,4 +270,20 @@ public class TLWMatch extends BaseMatch{
this.goalsGuest = apiFootballMatch.getGoalsGuest(); this.goalsGuest = apiFootballMatch.getGoalsGuest();
this.matchDatetime = apiFootballMatch.getMatchDateTime().replace("T", " ").substring(0, 19); this.matchDatetime = apiFootballMatch.getMatchDateTime().replace("T", " ").substring(0, 19);
} }
private Integer getTeamIdHomeFromApiFootballMatch(APIFootballMatch match) {
Integer id = TeamIDMatcher.getTippligaIdFromApiFootballId(match.getTeamIdHome());
if(id == null) {
System.out.println("Could not find id " + match.getTeamIdHome() + " for " + match.getTeamNameHome());
}
return id;
}
private Integer getTeamIdGuestFromApiFootballMatch(APIFootballMatch match) {
Integer id = TeamIDMatcher.getTippligaIdFromApiFootballId(match.getTeamIdGuest());
if(id == null) {
System.out.println("Could not find id " + match.getTeamIdGuest() + " for " + match.getTeamNameGuest());
}
return id;
}
} }

View File

@@ -53,7 +53,7 @@ public class TLWMatchdaysUpdater {
if(earliestDate.after(now)) { if(earliestDate.after(now)) {
String updateStart = "UPDATE phpbb_footb_matches SET "; String updateStart = "UPDATE phpbb_footb_matchdays SET ";
String condition = "WHERE season = " + matchdayOriginal.getSeason() + " " + String condition = "WHERE season = " + matchdayOriginal.getSeason() + " " +
"AND league = " + matchdayOriginal.getLeague() + " " + "AND league = " + matchdayOriginal.getLeague() + " " +
"AND matchday = " + matchdayOriginal.getMatchday() + ";\n"; "AND matchday = " + matchdayOriginal.getMatchday() + ";\n";

View File

@@ -24,9 +24,10 @@ public class TippligaSQLConnector {
} }
public TippligaSQLConnector() { public TippligaSQLConnector() {
String jdbcUrl = "jdbc:mysql://localhost/d0144ddb?user=root&password=&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"; String jdbcUrlLocalhost = "jdbc:mysql://localhost/d0144ddb?user=root&password=&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC";
String jdbcUrlProd = "jdbc:mysql://dd16124.kasserver.com/d0144ddb?user=d0144ddb&password=TippligaWuerzb_1&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC";
try { try {
con = DriverManager.getConnection(jdbcUrl); con = DriverManager.getConnection(jdbcUrlProd);
} catch (SQLException e) { } catch (SQLException e) {
/* TODO */ /* TODO */
e.printStackTrace(); e.printStackTrace();

View File

@@ -2027,14 +2027,14 @@
}, },
"event_date": "2020-10-04T13:00:00+02:00", "event_date": "2020-10-04T13:00:00+02:00",
"event_timestamp": 1601809200, "event_timestamp": 1601809200,
"firstHalfStart": null, "firstHalfStart": 1601809200,
"secondHalfStart": null, "secondHalfStart": 1601812800,
"round": "Regular Season - 6", "round": "Regular Season - 6",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Stade de la Mosson", "venue": "Stade de la Mosson",
"referee": "B. Millot", "referee": "Benoit Millot, France",
"homeTeam": { "homeTeam": {
"team_id": 82, "team_id": 82,
"team_name": "Montpellier", "team_name": "Montpellier",
@@ -2045,11 +2045,11 @@
"team_name": "Nimes", "team_name": "Nimes",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/92.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/92.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 0,
"goalsAwayTeam": null, "goalsAwayTeam": 1,
"score": { "score": {
"halftime": null, "halftime": "0-0",
"fulltime": null, "fulltime": "0-1",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -2065,14 +2065,14 @@
}, },
"event_date": "2020-10-04T15:00:00+02:00", "event_date": "2020-10-04T15:00:00+02:00",
"event_timestamp": 1601816400, "event_timestamp": 1601816400,
"firstHalfStart": null, "firstHalfStart": 1601816400,
"secondHalfStart": null, "secondHalfStart": 1601820000,
"round": "Regular Season - 6", "round": "Regular Season - 6",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Stade Francis-Le Blé", "venue": "Stade Francis-Le Blé",
"referee": "J. Hamel", "referee": "Johan Hamel, France",
"homeTeam": { "homeTeam": {
"team_id": 106, "team_id": 106,
"team_name": "Stade Brestois 29", "team_name": "Stade Brestois 29",
@@ -2083,11 +2083,11 @@
"team_name": "Monaco", "team_name": "Monaco",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/91.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/91.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 1,
"goalsAwayTeam": null, "goalsAwayTeam": 0,
"score": { "score": {
"halftime": null, "halftime": "1-0",
"fulltime": null, "fulltime": "1-0",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -2103,14 +2103,14 @@
}, },
"event_date": "2020-10-04T15:00:00+02:00", "event_date": "2020-10-04T15:00:00+02:00",
"event_timestamp": 1601816400, "event_timestamp": 1601816400,
"firstHalfStart": null, "firstHalfStart": 1601816400,
"secondHalfStart": null, "secondHalfStart": 1601820000,
"round": "Regular Season - 6", "round": "Regular Season - 6",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Stade Matmut-Atlantique", "venue": "Stade Matmut-Atlantique",
"referee": "A. Gautier", "referee": "Antony Gautier, France",
"homeTeam": { "homeTeam": {
"team_id": 78, "team_id": 78,
"team_name": "Bordeaux", "team_name": "Bordeaux",
@@ -2121,11 +2121,11 @@
"team_name": "Dijon", "team_name": "Dijon",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/89.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/89.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 3,
"goalsAwayTeam": null, "goalsAwayTeam": 0,
"score": { "score": {
"halftime": null, "halftime": "2-0",
"fulltime": null, "fulltime": "3-0",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -2141,14 +2141,14 @@
}, },
"event_date": "2020-10-04T15:00:00+02:00", "event_date": "2020-10-04T15:00:00+02:00",
"event_timestamp": 1601816400, "event_timestamp": 1601816400,
"firstHalfStart": null, "firstHalfStart": 1601816400,
"secondHalfStart": null, "secondHalfStart": 1601820000,
"round": "Regular Season - 6", "round": "Regular Season - 6",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Stade Saint-Symphorien", "venue": "Stade Saint-Symphorien",
"referee": "J. Miguelgorry", "referee": "Jerome Miguelgorry, France",
"homeTeam": { "homeTeam": {
"team_id": 112, "team_id": 112,
"team_name": "Metz", "team_name": "Metz",
@@ -2159,11 +2159,11 @@
"team_name": "Lorient", "team_name": "Lorient",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/97.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/97.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 3,
"goalsAwayTeam": null, "goalsAwayTeam": 1,
"score": { "score": {
"halftime": null, "halftime": "1-1",
"fulltime": null, "fulltime": "3-1",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -2179,14 +2179,14 @@
}, },
"event_date": "2020-10-04T15:00:00+02:00", "event_date": "2020-10-04T15:00:00+02:00",
"event_timestamp": 1601816400, "event_timestamp": 1601816400,
"firstHalfStart": null, "firstHalfStart": 1601816400,
"secondHalfStart": null, "secondHalfStart": 1601820000,
"round": "Regular Season - 6", "round": "Regular Season - 6",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Stade de la Meinau", "venue": "Stade de la Meinau",
"referee": "M. Lesage", "referee": "Mikael Lesage, France",
"homeTeam": { "homeTeam": {
"team_id": 95, "team_id": 95,
"team_name": "Strasbourg", "team_name": "Strasbourg",
@@ -2197,11 +2197,11 @@
"team_name": "Lille", "team_name": "Lille",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/79.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/79.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 0,
"goalsAwayTeam": null, "goalsAwayTeam": 3,
"score": { "score": {
"halftime": null, "halftime": "0-1",
"fulltime": null, "fulltime": "0-3",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -2217,14 +2217,14 @@
}, },
"event_date": "2020-10-04T17:00:00+02:00", "event_date": "2020-10-04T17:00:00+02:00",
"event_timestamp": 1601823600, "event_timestamp": 1601823600,
"firstHalfStart": null, "firstHalfStart": 1601823600,
"secondHalfStart": null, "secondHalfStart": 1601827200,
"round": "Regular Season - 6", "round": "Regular Season - 6",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Roazhon Park", "venue": "Roazhon Park",
"referee": "F. Batta", "referee": "Florent Batta, France",
"homeTeam": { "homeTeam": {
"team_id": 94, "team_id": 94,
"team_name": "Rennes", "team_name": "Rennes",
@@ -2235,11 +2235,11 @@
"team_name": "Reims", "team_name": "Reims",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/93.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/93.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 2,
"goalsAwayTeam": null, "goalsAwayTeam": 2,
"score": { "score": {
"halftime": null, "halftime": "2-1",
"fulltime": null, "fulltime": "2-2",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -2255,14 +2255,14 @@
}, },
"event_date": "2020-10-04T21:00:00+02:00", "event_date": "2020-10-04T21:00:00+02:00",
"event_timestamp": 1601838000, "event_timestamp": 1601838000,
"firstHalfStart": null, "firstHalfStart": 1601838000,
"secondHalfStart": null, "secondHalfStart": 1601841600,
"round": "Regular Season - 6", "round": "Regular Season - 6",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Groupama Stadium", "venue": "Groupama Stadium",
"referee": "S. Frappart", "referee": "Stephanie Frappart, France",
"homeTeam": { "homeTeam": {
"team_id": 80, "team_id": 80,
"team_name": "Lyon", "team_name": "Lyon",
@@ -2273,11 +2273,11 @@
"team_name": "Marseille", "team_name": "Marseille",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/81.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/81.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 1,
"goalsAwayTeam": null, "goalsAwayTeam": 1,
"score": { "score": {
"halftime": null, "halftime": "1-1",
"fulltime": null, "fulltime": "1-1",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }

File diff suppressed because it is too large Load Diff

View File

@@ -963,14 +963,14 @@
}, },
"event_date": "2020-10-04T15:30:00+02:00", "event_date": "2020-10-04T15:30:00+02:00",
"event_timestamp": 1601818200, "event_timestamp": 1601818200,
"firstHalfStart": null, "firstHalfStart": 1601818200,
"secondHalfStart": null, "secondHalfStart": 1601821800,
"round": "Regular Season - 3", "round": "Regular Season - 3",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "VOLKSWAGEN ARENA", "venue": "VOLKSWAGEN ARENA",
"referee": null, "referee": "Felix Zwayer, Germany",
"homeTeam": { "homeTeam": {
"team_id": 161, "team_id": 161,
"team_name": "VfL Wolfsburg", "team_name": "VfL Wolfsburg",
@@ -981,11 +981,11 @@
"team_name": "FC Augsburg", "team_name": "FC Augsburg",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/170.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/170.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 0,
"goalsAwayTeam": null, "goalsAwayTeam": 0,
"score": { "score": {
"halftime": null, "halftime": "0-0",
"fulltime": null, "fulltime": "0-0",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -1001,14 +1001,14 @@
}, },
"event_date": "2020-10-04T18:00:00+02:00", "event_date": "2020-10-04T18:00:00+02:00",
"event_timestamp": 1601827200, "event_timestamp": 1601827200,
"firstHalfStart": null, "firstHalfStart": 1601827200,
"secondHalfStart": null, "secondHalfStart": 1601830800,
"round": "Regular Season - 3", "round": "Regular Season - 3",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Allianz Arena", "venue": "Allianz Arena",
"referee": null, "referee": "Benjamin Cortus, Germany",
"homeTeam": { "homeTeam": {
"team_id": 157, "team_id": 157,
"team_name": "Bayern Munich", "team_name": "Bayern Munich",
@@ -1019,11 +1019,11 @@
"team_name": "Hertha Berlin", "team_name": "Hertha Berlin",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/159.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/159.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 4,
"goalsAwayTeam": null, "goalsAwayTeam": 3,
"score": { "score": {
"halftime": null, "halftime": "1-0",
"fulltime": null, "fulltime": "4-3",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }

File diff suppressed because it is too large Load Diff

View File

@@ -780,7 +780,7 @@
"statusShort": "FT", "statusShort": "FT",
"elapsed": 90, "elapsed": 90,
"venue": "Städtisches Stadion an der Grünwalder Straße", "venue": "Städtisches Stadion an der Grünwalder Straße",
"referee": "Martin Speckner, Germany", "referee": "M. Speckner",
"homeTeam": { "homeTeam": {
"team_id": 4674, "team_id": 4674,
"team_name": "Bayern München II", "team_name": "Bayern München II",
@@ -818,7 +818,7 @@
"statusShort": "FT", "statusShort": "FT",
"elapsed": 90, "elapsed": 90,
"venue": "Hänsch-Arena", "venue": "Hänsch-Arena",
"referee": "Patrick Glaser, Germany", "referee": "P. Glaser",
"homeTeam": { "homeTeam": {
"team_id": 1318, "team_id": 1318,
"team_name": "SV Meppen", "team_name": "SV Meppen",
@@ -856,7 +856,7 @@
"statusShort": "FT", "statusShort": "FT",
"elapsed": 90, "elapsed": 90,
"venue": "MDCC-Arena", "venue": "MDCC-Arena",
"referee": "Steven Greif, Germany", "referee": "S. Greif",
"homeTeam": { "homeTeam": {
"team_id": 179, "team_id": 179,
"team_name": "FC Magdeburg", "team_name": "FC Magdeburg",
@@ -894,7 +894,7 @@
"statusShort": "FT", "statusShort": "FT",
"elapsed": 90, "elapsed": 90,
"venue": "GGZ Arena", "venue": "GGZ Arena",
"referee": "Lars Erbst, Germany", "referee": "L. Erbst",
"homeTeam": { "homeTeam": {
"team_id": 1315, "team_id": 1315,
"team_name": "FSV Zwickau", "team_name": "FSV Zwickau",
@@ -932,7 +932,7 @@
"statusShort": "FT", "statusShort": "FT",
"elapsed": 90, "elapsed": 90,
"venue": "Audi-Sportpark", "venue": "Audi-Sportpark",
"referee": "Wolfgang Haslberger, Germany", "referee": "W. Haslberger",
"homeTeam": { "homeTeam": {
"team_id": 184, "team_id": 184,
"team_name": "FC Ingolstadt 04", "team_name": "FC Ingolstadt 04",
@@ -970,7 +970,7 @@
"statusShort": "FT", "statusShort": "FT",
"elapsed": 90, "elapsed": 90,
"venue": "Carl-Benz-Stadion", "venue": "Carl-Benz-Stadion",
"referee": "Robin Braun, Germany", "referee": "R. Braun",
"homeTeam": { "homeTeam": {
"team_id": 4268, "team_id": 4268,
"team_name": "Waldhof Mannheim", "team_name": "Waldhof Mannheim",
@@ -1008,7 +1008,7 @@
"statusShort": "FT", "statusShort": "FT",
"elapsed": 90, "elapsed": 90,
"venue": "Dietmar-Scholze-Stadion an der Lohmühle", "venue": "Dietmar-Scholze-Stadion an der Lohmühle",
"referee": "Eric Muller, Germany", "referee": "E. Müller",
"homeTeam": { "homeTeam": {
"team_id": 1625, "team_id": 1625,
"team_name": "VfB Lubeck", "team_name": "VfB Lubeck",
@@ -1039,14 +1039,14 @@
}, },
"event_date": "2020-10-04T13:00:00+02:00", "event_date": "2020-10-04T13:00:00+02:00",
"event_timestamp": 1601809200, "event_timestamp": 1601809200,
"firstHalfStart": null, "firstHalfStart": 1601809200,
"secondHalfStart": null, "secondHalfStart": 1601812800,
"round": "Regular Season - 3", "round": "Regular Season - 3",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "Ostseestadion", "venue": "Ostseestadion",
"referee": null, "referee": "Nicolas Winter, Germany",
"homeTeam": { "homeTeam": {
"team_id": 1321, "team_id": 1321,
"team_name": "Hansa Rostock", "team_name": "Hansa Rostock",
@@ -1057,11 +1057,11 @@
"team_name": "KFC Uerdingen 05", "team_name": "KFC Uerdingen 05",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/1322.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/1322.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 0,
"goalsAwayTeam": null, "goalsAwayTeam": 0,
"score": { "score": {
"halftime": null, "halftime": "0-0",
"fulltime": null, "fulltime": "0-0",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -1077,14 +1077,14 @@
}, },
"event_date": "2020-10-04T14:00:00+02:00", "event_date": "2020-10-04T14:00:00+02:00",
"event_timestamp": 1601812800, "event_timestamp": 1601812800,
"firstHalfStart": null, "firstHalfStart": 1601812800,
"secondHalfStart": null, "secondHalfStart": 1601816400,
"round": "Regular Season - 3", "round": "Regular Season - 3",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "PSD Bank Arena", "venue": "PSD Bank Arena",
"referee": null, "referee": "Asmir Osmanagic, Germany",
"homeTeam": { "homeTeam": {
"team_id": 1639, "team_id": 1639,
"team_name": "FC Saarbrucken", "team_name": "FC Saarbrucken",
@@ -1095,11 +1095,11 @@
"team_name": "Hallescher FC", "team_name": "Hallescher FC",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/1316.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/1316.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 4,
"goalsAwayTeam": null, "goalsAwayTeam": 0,
"score": { "score": {
"halftime": null, "halftime": "2-0",
"fulltime": null, "fulltime": "4-0",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -1115,14 +1115,14 @@
}, },
"event_date": "2020-10-05T19:00:00+02:00", "event_date": "2020-10-05T19:00:00+02:00",
"event_timestamp": 1601917200, "event_timestamp": 1601917200,
"firstHalfStart": null, "firstHalfStart": 1601917200,
"secondHalfStart": null, "secondHalfStart": 1601920800,
"round": "Regular Season - 3", "round": "Regular Season - 3",
"status": "Not Started", "status": "Match Finished",
"statusShort": "NS", "statusShort": "FT",
"elapsed": 0, "elapsed": 90,
"venue": "BRITA-Arena", "venue": "BRITA-Arena",
"referee": null, "referee": "Matthias Jollenbeck, Germany",
"homeTeam": { "homeTeam": {
"team_id": 1319, "team_id": 1319,
"team_name": "SV Wehen", "team_name": "SV Wehen",
@@ -1133,11 +1133,11 @@
"team_name": "FC Kaiserslautern", "team_name": "FC Kaiserslautern",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/745.png" "logo": "https:\/\/media.api-sports.io\/football\/teams\/745.png"
}, },
"goalsHomeTeam": null, "goalsHomeTeam": 2,
"goalsAwayTeam": null, "goalsAwayTeam": 2,
"score": { "score": {
"halftime": null, "halftime": "2-0",
"fulltime": null, "fulltime": "2-2",
"extratime": null, "extratime": null,
"penalty": null "penalty": null
} }
@@ -2282,6 +2282,44 @@
"penalty": null "penalty": null
} }
}, },
{
"fixture_id": 593492,
"league_id": 2795,
"league": {
"name": "Liga 3",
"country": "Germany",
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
},
"event_date": "2020-10-23T19:00:00+02:00",
"event_timestamp": 1603472400,
"firstHalfStart": null,
"secondHalfStart": null,
"round": "Regular Season - 7",
"status": "Not Started",
"statusShort": "NS",
"elapsed": 0,
"venue": "GGZ Arena",
"referee": null,
"homeTeam": {
"team_id": 1315,
"team_name": "FSV Zwickau",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/1315.png"
},
"awayTeam": {
"team_id": 9335,
"team_name": "Türkgücü-Ataspor",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/9335.png"
},
"goalsHomeTeam": null,
"goalsAwayTeam": null,
"score": {
"halftime": null,
"fulltime": null,
"extratime": null,
"penalty": null
}
},
{ {
"fixture_id": 593488, "fixture_id": 593488,
"league_id": 2795, "league_id": 2795,
@@ -2291,13 +2329,13 @@
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png", "logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg" "flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
}, },
"event_date": "2020-10-24T02:00:00+02:00", "event_date": "2020-10-24T14:00:00+02:00",
"event_timestamp": 1603497600, "event_timestamp": 1603540800,
"firstHalfStart": null, "firstHalfStart": null,
"secondHalfStart": null, "secondHalfStart": null,
"round": "Regular Season - 7", "round": "Regular Season - 7",
"status": "Time to be defined", "status": "Not Started",
"statusShort": "TBD", "statusShort": "NS",
"elapsed": 0, "elapsed": 0,
"venue": "Hänsch-Arena", "venue": "Hänsch-Arena",
"referee": null, "referee": null,
@@ -2320,44 +2358,6 @@
"penalty": null "penalty": null
} }
}, },
{
"fixture_id": 593489,
"league_id": 2795,
"league": {
"name": "Liga 3",
"country": "Germany",
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
},
"event_date": "2020-10-24T02:00:00+02:00",
"event_timestamp": 1603497600,
"firstHalfStart": null,
"secondHalfStart": null,
"round": "Regular Season - 7",
"status": "Time to be defined",
"statusShort": "TBD",
"elapsed": 0,
"venue": "Städtisches Stadion an der Grünwalder Straße",
"referee": null,
"homeTeam": {
"team_id": 4674,
"team_name": "Bayern München II",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/4674.png"
},
"awayTeam": {
"team_id": 4268,
"team_name": "Waldhof Mannheim",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/4268.png"
},
"goalsHomeTeam": null,
"goalsAwayTeam": null,
"score": {
"halftime": null,
"fulltime": null,
"extratime": null,
"penalty": null
}
},
{ {
"fixture_id": 593490, "fixture_id": 593490,
"league_id": 2795, "league_id": 2795,
@@ -2367,13 +2367,13 @@
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png", "logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg" "flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
}, },
"event_date": "2020-10-24T02:00:00+02:00", "event_date": "2020-10-24T14:00:00+02:00",
"event_timestamp": 1603497600, "event_timestamp": 1603540800,
"firstHalfStart": null, "firstHalfStart": null,
"secondHalfStart": null, "secondHalfStart": null,
"round": "Regular Season - 7", "round": "Regular Season - 7",
"status": "Time to be defined", "status": "Not Started",
"statusShort": "TBD", "statusShort": "NS",
"elapsed": 0, "elapsed": 0,
"venue": "Audi-Sportpark", "venue": "Audi-Sportpark",
"referee": null, "referee": null,
@@ -2405,13 +2405,13 @@
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png", "logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg" "flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
}, },
"event_date": "2020-10-24T02:00:00+02:00", "event_date": "2020-10-24T14:00:00+02:00",
"event_timestamp": 1603497600, "event_timestamp": 1603540800,
"firstHalfStart": null, "firstHalfStart": null,
"secondHalfStart": null, "secondHalfStart": null,
"round": "Regular Season - 7", "round": "Regular Season - 7",
"status": "Time to be defined", "status": "Not Started",
"statusShort": "TBD", "statusShort": "NS",
"elapsed": 0, "elapsed": 0,
"venue": "Ostseestadion", "venue": "Ostseestadion",
"referee": null, "referee": null,
@@ -2434,82 +2434,6 @@
"penalty": null "penalty": null
} }
}, },
{
"fixture_id": 593492,
"league_id": 2795,
"league": {
"name": "Liga 3",
"country": "Germany",
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
},
"event_date": "2020-10-24T02:00:00+02:00",
"event_timestamp": 1603497600,
"firstHalfStart": null,
"secondHalfStart": null,
"round": "Regular Season - 7",
"status": "Time to be defined",
"statusShort": "TBD",
"elapsed": 0,
"venue": "GGZ Arena",
"referee": null,
"homeTeam": {
"team_id": 1315,
"team_name": "FSV Zwickau",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/1315.png"
},
"awayTeam": {
"team_id": 9335,
"team_name": "Türkgücü-Ataspor",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/9335.png"
},
"goalsHomeTeam": null,
"goalsAwayTeam": null,
"score": {
"halftime": null,
"fulltime": null,
"extratime": null,
"penalty": null
}
},
{
"fixture_id": 593493,
"league_id": 2795,
"league": {
"name": "Liga 3",
"country": "Germany",
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
},
"event_date": "2020-10-24T02:00:00+02:00",
"event_timestamp": 1603497600,
"firstHalfStart": null,
"secondHalfStart": null,
"round": "Regular Season - 7",
"status": "Time to be defined",
"statusShort": "TBD",
"elapsed": 0,
"venue": "PSD Bank Arena",
"referee": null,
"homeTeam": {
"team_id": 1639,
"team_name": "FC Saarbrucken",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/1639.png"
},
"awayTeam": {
"team_id": 4265,
"team_name": "Verl",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/4265.png"
},
"goalsHomeTeam": null,
"goalsAwayTeam": null,
"score": {
"halftime": null,
"fulltime": null,
"extratime": null,
"penalty": null
}
},
{ {
"fixture_id": 593494, "fixture_id": 593494,
"league_id": 2795, "league_id": 2795,
@@ -2519,13 +2443,13 @@
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png", "logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg" "flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
}, },
"event_date": "2020-10-24T02:00:00+02:00", "event_date": "2020-10-24T14:00:00+02:00",
"event_timestamp": 1603497600, "event_timestamp": 1603540800,
"firstHalfStart": null, "firstHalfStart": null,
"secondHalfStart": null, "secondHalfStart": null,
"round": "Regular Season - 7", "round": "Regular Season - 7",
"status": "Time to be defined", "status": "Not Started",
"statusShort": "TBD", "statusShort": "NS",
"elapsed": 0, "elapsed": 0,
"venue": "Dietmar-Scholze-Stadion an der Lohmühle", "venue": "Dietmar-Scholze-Stadion an der Lohmühle",
"referee": null, "referee": null,
@@ -2548,44 +2472,6 @@
"penalty": null "penalty": null
} }
}, },
{
"fixture_id": 593495,
"league_id": 2795,
"league": {
"name": "Liga 3",
"country": "Germany",
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
},
"event_date": "2020-10-24T02:00:00+02:00",
"event_timestamp": 1603497600,
"firstHalfStart": null,
"secondHalfStart": null,
"round": "Regular Season - 7",
"status": "Time to be defined",
"statusShort": "TBD",
"elapsed": 0,
"venue": "Alpenbauer Sportpark",
"referee": null,
"homeTeam": {
"team_id": 1314,
"team_name": "SpVgg Unterhaching",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/1314.png"
},
"awayTeam": {
"team_id": 786,
"team_name": "TSV 1860 Munich",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/786.png"
},
"goalsHomeTeam": null,
"goalsAwayTeam": null,
"score": {
"halftime": null,
"fulltime": null,
"extratime": null,
"penalty": null
}
},
{ {
"fixture_id": 593496, "fixture_id": 593496,
"league_id": 2795, "league_id": 2795,
@@ -2595,13 +2481,13 @@
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png", "logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg" "flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
}, },
"event_date": "2020-10-24T02:00:00+02:00", "event_date": "2020-10-24T14:00:00+02:00",
"event_timestamp": 1603497600, "event_timestamp": 1603540800,
"firstHalfStart": null, "firstHalfStart": null,
"secondHalfStart": null, "secondHalfStart": null,
"round": "Regular Season - 7", "round": "Regular Season - 7",
"status": "Time to be defined", "status": "Not Started",
"statusShort": "TBD", "statusShort": "NS",
"elapsed": 0, "elapsed": 0,
"venue": "MDCC-Arena", "venue": "MDCC-Arena",
"referee": null, "referee": null,
@@ -2633,13 +2519,13 @@
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png", "logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg" "flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
}, },
"event_date": "2020-10-24T02:00:00+02:00", "event_date": "2020-10-24T14:00:00+02:00",
"event_timestamp": 1603497600, "event_timestamp": 1603540800,
"firstHalfStart": null, "firstHalfStart": null,
"secondHalfStart": null, "secondHalfStart": null,
"round": "Regular Season - 7", "round": "Regular Season - 7",
"status": "Time to be defined", "status": "Not Started",
"statusShort": "TBD", "statusShort": "NS",
"elapsed": 0, "elapsed": 0,
"venue": "Schauinsland-Reisen-Arena", "venue": "Schauinsland-Reisen-Arena",
"referee": null, "referee": null,
@@ -2662,6 +2548,120 @@
"penalty": null "penalty": null
} }
}, },
{
"fixture_id": 593493,
"league_id": 2795,
"league": {
"name": "Liga 3",
"country": "Germany",
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
},
"event_date": "2020-10-25T12:00:00+01:00",
"event_timestamp": 1603623600,
"firstHalfStart": null,
"secondHalfStart": null,
"round": "Regular Season - 7",
"status": "Not Started",
"statusShort": "NS",
"elapsed": 0,
"venue": "PSD Bank Arena",
"referee": null,
"homeTeam": {
"team_id": 1639,
"team_name": "FC Saarbrucken",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/1639.png"
},
"awayTeam": {
"team_id": 4265,
"team_name": "Verl",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/4265.png"
},
"goalsHomeTeam": null,
"goalsAwayTeam": null,
"score": {
"halftime": null,
"fulltime": null,
"extratime": null,
"penalty": null
}
},
{
"fixture_id": 593489,
"league_id": 2795,
"league": {
"name": "Liga 3",
"country": "Germany",
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
},
"event_date": "2020-10-25T13:00:00+01:00",
"event_timestamp": 1603627200,
"firstHalfStart": null,
"secondHalfStart": null,
"round": "Regular Season - 7",
"status": "Not Started",
"statusShort": "NS",
"elapsed": 0,
"venue": "Städtisches Stadion an der Grünwalder Straße",
"referee": null,
"homeTeam": {
"team_id": 4674,
"team_name": "Bayern München II",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/4674.png"
},
"awayTeam": {
"team_id": 4268,
"team_name": "Waldhof Mannheim",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/4268.png"
},
"goalsHomeTeam": null,
"goalsAwayTeam": null,
"score": {
"halftime": null,
"fulltime": null,
"extratime": null,
"penalty": null
}
},
{
"fixture_id": 593495,
"league_id": 2795,
"league": {
"name": "Liga 3",
"country": "Germany",
"logo": "https:\/\/media.api-sports.io\/football\/leagues\/80.png",
"flag": "https:\/\/media.api-sports.io\/flags\/de.svg"
},
"event_date": "2020-10-26T18:00:00+01:00",
"event_timestamp": 1603731600,
"firstHalfStart": null,
"secondHalfStart": null,
"round": "Regular Season - 7",
"status": "Not Started",
"statusShort": "NS",
"elapsed": 0,
"venue": "Alpenbauer Sportpark",
"referee": null,
"homeTeam": {
"team_id": 1314,
"team_name": "SpVgg Unterhaching",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/1314.png"
},
"awayTeam": {
"team_id": 786,
"team_name": "TSV 1860 Munich",
"logo": "https:\/\/media.api-sports.io\/football\/teams\/786.png"
},
"goalsHomeTeam": null,
"goalsAwayTeam": null,
"score": {
"halftime": null,
"fulltime": null,
"extratime": null,
"penalty": null
}
},
{ {
"fixture_id": 593498, "fixture_id": 593498,
"league_id": 2795, "league_id": 2795,

View File

@@ -0,0 +1,45 @@
{
"api": {
"results": 38,
"fixtures": [
"Regular_Season_-_1",
"Regular_Season_-_2",
"Regular_Season_-_3",
"Regular_Season_-_4",
"Regular_Season_-_5",
"Regular_Season_-_6",
"Regular_Season_-_7",
"Regular_Season_-_8",
"Regular_Season_-_9",
"Regular_Season_-_10",
"Regular_Season_-_11",
"Regular_Season_-_12",
"Regular_Season_-_13",
"Regular_Season_-_14",
"Regular_Season_-_15",
"Regular_Season_-_16",
"Regular_Season_-_17",
"Regular_Season_-_18",
"Regular_Season_-_19",
"Regular_Season_-_20",
"Regular_Season_-_21",
"Regular_Season_-_22",
"Regular_Season_-_23",
"Regular_Season_-_24",
"Regular_Season_-_25",
"Regular_Season_-_26",
"Regular_Season_-_27",
"Regular_Season_-_28",
"Regular_Season_-_29",
"Regular_Season_-_30",
"Regular_Season_-_31",
"Regular_Season_-_32",
"Regular_Season_-_33",
"Regular_Season_-_34",
"Regular_Season_-_35",
"Regular_Season_-_36",
"Regular_Season_-_37",
"Regular_Season_-_38"
]
}
}

View File

@@ -13,7 +13,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 1 "leagueMatchday": 1,
"showTable": true
}, },
{ {
"type": "SingleMatch", "type": "SingleMatch",
@@ -38,7 +39,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 2 "leagueMatchday": 2,
"showTable": true
}, },
{ {
"type": "SingleMatch", "type": "SingleMatch",
@@ -63,7 +65,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 3 "leagueMatchday": 3,
"showTable": true
}, },
{ {
"type": "SingleMatch", "type": "SingleMatch",
@@ -83,7 +86,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 4 "leagueMatchday": 4,
"showTable": true
}, },
{ {
"type": "SingleMatch", "type": "SingleMatch",
@@ -94,6 +98,11 @@
"type": "SingleMatch", "type": "SingleMatch",
"matchLeague": 2743, "matchLeague": 2743,
"matchId": 585098 "matchId": 585098
},
{
"type": "SingleMatch",
"matchLeague": 2795,
"matchId": 593472
} }
] ]
}, },
@@ -103,7 +112,23 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 5 "leagueMatchday": 5,
"showTable": true
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585100
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585107
},
{
"type": "SingleMatch",
"matchLeague": 2664,
"matchId": 571546
} }
] ]
}, },
@@ -113,7 +138,23 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 6 "leagueMatchday": 6,
"showTable": true
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585115
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585116
},
{
"type": "SingleMatch",
"matchLeague": 2790,
"matchId": 592206
} }
] ]
}, },
@@ -123,7 +164,23 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 7 "leagueMatchday": 7,
"showTable": true
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585117
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585125
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585122
} }
] ]
}, },
@@ -133,7 +190,23 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 8 "leagueMatchday": 8,
"showTable": true
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585132
},
{
"type": "SingleMatch",
"matchLeague": 2743,
"matchId": 585134
},
{
"type": "SingleMatch",
"matchLeague": 2795,
"matchId": 593535
} }
] ]
}, },
@@ -143,7 +216,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 9 "leagueMatchday": 9,
"showTable": true
} }
] ]
}, },
@@ -153,7 +227,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 10 "leagueMatchday": 10,
"showTable": true
} }
] ]
}, },
@@ -163,7 +238,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 11 "leagueMatchday": 11,
"showTable": true
} }
] ]
}, },
@@ -173,7 +249,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 12 "leagueMatchday": 12,
"showTable": true
} }
] ]
}, },
@@ -183,7 +260,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 13 "leagueMatchday": 13,
"showTable": true
} }
] ]
}, },
@@ -193,7 +271,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 14 "leagueMatchday": 14,
"showTable": true
} }
] ]
}, },
@@ -203,7 +282,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 15 "leagueMatchday": 15,
"showTable": true
} }
] ]
}, },
@@ -213,7 +293,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 16 "leagueMatchday": 16,
"showTable": true
} }
] ]
}, },
@@ -223,7 +304,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 17 "leagueMatchday": 17,
"showTable": true
} }
] ]
}, },
@@ -233,7 +315,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 18 "leagueMatchday": 18,
"showTable": true
} }
] ]
}, },
@@ -243,7 +326,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2743, "matchesLeague": 2743,
"leagueMatchday": 18 "leagueMatchday": 18,
"showTable": true
} }
] ]
}, },
@@ -253,7 +337,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 19 "leagueMatchday": 19,
"showTable": true
} }
] ]
}, },
@@ -263,7 +348,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 20 "leagueMatchday": 20,
"showTable": true
} }
] ]
}, },
@@ -273,7 +359,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 21 "leagueMatchday": 21,
"showTable": true
} }
] ]
}, },
@@ -283,7 +370,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 22 "leagueMatchday": 22,
"showTable": true
} }
] ]
}, },
@@ -293,7 +381,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 23 "leagueMatchday": 23,
"showTable": true
} }
] ]
}, },
@@ -303,7 +392,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 24 "leagueMatchday": 24,
"showTable": true
} }
] ]
}, },
@@ -313,7 +403,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 25 "leagueMatchday": 25,
"showTable": true
} }
] ]
}, },
@@ -332,7 +423,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 26 "leagueMatchday": 26,
"showTable": true
} }
] ]
}, },
@@ -342,7 +434,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 27 "leagueMatchday": 27,
"showTable": true
} }
] ]
}, },
@@ -352,7 +445,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 28 "leagueMatchday": 28,
"showTable": true
} }
] ]
}, },
@@ -371,7 +465,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 29 "leagueMatchday": 29,
"showTable": true
} }
] ]
}, },
@@ -381,7 +476,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 30 "leagueMatchday": 30,
"showTable": true
} }
] ]
}, },
@@ -391,7 +487,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 31 "leagueMatchday": 31,
"showTable": true
} }
] ]
}, },
@@ -401,7 +498,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 32 "leagueMatchday": 32,
"showTable": true
} }
] ]
}, },
@@ -411,7 +509,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 33 "leagueMatchday": 33,
"showTable": true
} }
] ]
}, },
@@ -431,7 +530,8 @@
{ {
"type": "AllMatchesOfMatchday", "type": "AllMatchesOfMatchday",
"matchesLeague": 2755, "matchesLeague": 2755,
"leagueMatchday": 34 "leagueMatchday": 34,
"showTable": true
} }
] ]
}, },

View File

@@ -418,5 +418,15 @@
"teamname": "AS Monaco", "teamname": "AS Monaco",
"tippligaID": 160, "tippligaID": 160,
"apiFootballID": 91 "apiFootballID": 91
},
{
"teamname": "Manchester United",
"tippligaID": 501,
"apiFootballID": 33
},
{
"teamname": "FC Arsenal London",
"tippligaID": 522,
"apiFootballID": 42
} }
] ]

View File

@@ -0,0 +1,20 @@
package de.jeyp91.apifootball;
import org.junit.Test;
import java.io.IOException;
public class APIFootballUpdaterTest {
@Test
public void updateFixturesTest() throws IOException {
APIFootballUpdater updater = new APIFootballUpdater(2021);
updater.updateFixtures(2743);
}
@Test
public void updateAllFixturesTest() throws IOException {
APIFootballUpdater updater = new APIFootballUpdater(2021);
updater.updateAllFixtures("Tippliga.json");
}
}

View File

@@ -5,11 +5,20 @@ import org.junit.Test;
public class TLWMatchdayUpdaterTest { public class TLWMatchdayUpdaterTest {
@Test @Test
public void getUpdateSqlTest() throws Exception { public void getUpdateSqlTest1() throws Exception {
TLWMatchdaysUpdater matchdaysUpdater = new TLWMatchdaysUpdater(2021, 1, "Tippliga.json"); TLWMatchdaysUpdater matchdaysUpdater = new TLWMatchdaysUpdater(2021, 1, "Tippliga.json");
String sql = matchdaysUpdater.getUpdateSql(); String sql = matchdaysUpdater.getUpdateSql();
System.out.println(sql); System.out.println(sql);
} }
@Test
public void getUpdateSqlTest2() throws Exception {
TLWMatchdaysUpdater matchdaysUpdater = new TLWMatchdaysUpdater(2021, 2, "Tippliga.json");
String sql = matchdaysUpdater.getUpdateSql();
System.out.println(sql);
}
} }

View File

@@ -5,10 +5,18 @@ import org.junit.Test;
public class TLWMatchesUpdaterFootballTest { public class TLWMatchesUpdaterFootballTest {
@Test @Test
public void getMatchesTest() throws Exception { public void getUpdateSqlTest1() throws Exception {
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 1, "Tippliga.json"); TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 1, "Tippliga.json");
String sql = updater.getUpdateSQL(); String sql = updater.getUpdateSQL();
System.out.println(sql); System.out.println(sql);
} }
@Test
public void getUpdateSqlTest2() throws Exception {
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(2021, 2, "Tippliga.json");
String sql = updater.getUpdateSQL();
System.out.println(sql);
}
} }

View File

@@ -5,7 +5,7 @@ import org.junit.Test;
public class TLWTeamsUpdaterTest { public class TLWTeamsUpdaterTest {
@Test @Test
public void getTeamsTest() throws Exception { public void getInsertSQLTest1() throws Exception {
TLWMatchesUpdaterFootball matchesUpdater = new TLWMatchesUpdaterFootball(2021, 1, "Tippliga.json"); TLWMatchesUpdaterFootball matchesUpdater = new TLWMatchesUpdaterFootball(2021, 1, "Tippliga.json");
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(2021, 1, matchesUpdater.tlwMatchesUpdated); TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(2021, 1, matchesUpdater.tlwMatchesUpdated);
@@ -13,4 +13,14 @@ public class TLWTeamsUpdaterTest {
System.out.println(sql); System.out.println(sql);
} }
@Test
public void getInsertSQLTest2() throws Exception {
TLWMatchesUpdaterFootball matchesUpdater = new TLWMatchesUpdaterFootball(2021, 2, "Tippliga.json");
TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(2021, 2, matchesUpdater.tlwMatchesUpdated);
String sql = teamsUpdater.getInsertSQL();
System.out.println(sql);
}
} }