diff --git a/.gitignore b/.gitignore index 40d27d8..11ed966 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -/.gradle/ /.idea/ /.settings/ /build/ diff --git a/.gradle/6.4.1/executionHistory/executionHistory.bin b/.gradle/6.4.1/executionHistory/executionHistory.bin new file mode 100644 index 0000000..7484398 Binary files /dev/null and b/.gradle/6.4.1/executionHistory/executionHistory.bin differ diff --git a/.gradle/6.4.1/executionHistory/executionHistory.lock b/.gradle/6.4.1/executionHistory/executionHistory.lock new file mode 100644 index 0000000..0e993e0 Binary files /dev/null and b/.gradle/6.4.1/executionHistory/executionHistory.lock differ diff --git a/.gradle/6.4.1/fileChanges/last-build.bin b/.gradle/6.4.1/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/6.4.1/fileChanges/last-build.bin differ diff --git a/.gradle/6.4.1/fileContent/fileContent.lock b/.gradle/6.4.1/fileContent/fileContent.lock new file mode 100644 index 0000000..7157a2a Binary files /dev/null and b/.gradle/6.4.1/fileContent/fileContent.lock differ diff --git a/.gradle/6.4.1/fileHashes/fileHashes.bin b/.gradle/6.4.1/fileHashes/fileHashes.bin new file mode 100644 index 0000000..1de6763 Binary files /dev/null and b/.gradle/6.4.1/fileHashes/fileHashes.bin differ diff --git a/.gradle/6.4.1/fileHashes/fileHashes.lock b/.gradle/6.4.1/fileHashes/fileHashes.lock new file mode 100644 index 0000000..5f13d30 Binary files /dev/null and b/.gradle/6.4.1/fileHashes/fileHashes.lock differ diff --git a/.gradle/6.4.1/fileHashes/resourceHashesCache.bin b/.gradle/6.4.1/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..f896898 Binary files /dev/null and b/.gradle/6.4.1/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/6.4.1/gc.properties b/.gradle/6.4.1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/6.4.1/javaCompile/classAnalysis.bin b/.gradle/6.4.1/javaCompile/classAnalysis.bin new file mode 100644 index 0000000..60c3ac2 Binary files /dev/null and b/.gradle/6.4.1/javaCompile/classAnalysis.bin differ diff --git a/.gradle/6.4.1/javaCompile/jarAnalysis.bin b/.gradle/6.4.1/javaCompile/jarAnalysis.bin new file mode 100644 index 0000000..7e3aeee Binary files /dev/null and b/.gradle/6.4.1/javaCompile/jarAnalysis.bin differ diff --git a/.gradle/6.4.1/javaCompile/javaCompile.lock b/.gradle/6.4.1/javaCompile/javaCompile.lock new file mode 100644 index 0000000..2e3efd6 Binary files /dev/null and b/.gradle/6.4.1/javaCompile/javaCompile.lock differ diff --git a/.gradle/6.4.1/javaCompile/taskHistory.bin b/.gradle/6.4.1/javaCompile/taskHistory.bin new file mode 100644 index 0000000..499af99 Binary files /dev/null and b/.gradle/6.4.1/javaCompile/taskHistory.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..f0d6c41 Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..b79b97c --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Mon May 25 16:15:59 CEST 2020 +gradle.version=6.4.1 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..f88248a Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock new file mode 100644 index 0000000..22e99c5 Binary files /dev/null and b/.gradle/checksums/checksums.lock differ diff --git a/.gradle/checksums/md5-checksums.bin b/.gradle/checksums/md5-checksums.bin new file mode 100644 index 0000000..4cd3342 Binary files /dev/null and b/.gradle/checksums/md5-checksums.bin differ diff --git a/.gradle/checksums/sha1-checksums.bin b/.gradle/checksums/sha1-checksums.bin new file mode 100644 index 0000000..f038063 Binary files /dev/null and b/.gradle/checksums/sha1-checksums.bin differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/de/jeyp91/App.java b/src/main/java/de/jeyp91/App.java index 0fda9da..20c3d80 100644 --- a/src/main/java/de/jeyp91/App.java +++ b/src/main/java/de/jeyp91/App.java @@ -1,4 +1,5 @@ package de.jeyp91; +import de.jeyp91.apifootball.APIFootballUpdater; import de.jeyp91.tippliga.*; import net.sourceforge.argparse4j.ArgumentParsers; import net.sourceforge.argparse4j.inf.ArgumentParser; @@ -29,16 +30,19 @@ public class App { sql = creator.getSQLInsertString(); break; case "MatchesUpdaterFootball": - TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, league, configFile); - sql = updater.getUpdateSQL(); + TLWMatchesUpdaterFootball tlwMatchesUpdaterFootball = new TLWMatchesUpdaterFootball(season, league, configFile); + sql = tlwMatchesUpdaterFootball.getUpdateSQL(); break; case "TeamsUpdater": TLWTeamsUpdater teamsUpdater = new TLWTeamsUpdater(season, league, configFile); sql = teamsUpdater.getInsertSQL(); + case "APIFootballUpdater": + APIFootballUpdater apiFootballUpdater = new APIFootballUpdater(season); + apiFootballUpdater.updateAllFixtures(configFile); default: break; } - if(!StatusHolder.getError()) { + if(!StatusHolder.getError() && !sql.equals("")) { TippligaSQLConnector con = new TippligaSQLConnector(); con.executeQuery(sql); } @@ -47,11 +51,11 @@ public class App { private static void initOptions(String[] args) { ArgumentParser parser = ArgumentParsers.newFor("tlw").build() .defaultHelp(true) - .description(""); + .description("Test"); parser.addArgument("-m", "--mode") .dest("mode") - .choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "TeamsUpdater") + .choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "TeamsUpdater", "APIFootballUpdater") .help("") .required(true) .type(String.class); diff --git a/src/test/java/de/jeyp91/apifootball/APIFootballUpdaterTest.java b/src/test/java/de/jeyp91/apifootball/APIFootballUpdaterTest.java index a264396..8f381a9 100644 --- a/src/test/java/de/jeyp91/apifootball/APIFootballUpdaterTest.java +++ b/src/test/java/de/jeyp91/apifootball/APIFootballUpdaterTest.java @@ -9,20 +9,20 @@ public class APIFootballUpdaterTest { @Test public void updateFixturesTest() throws IOException { APIFootballUpdater updater = new APIFootballUpdater(2021); - updater.updateFixtures(2743); + // updater.updateFixtures(2743); } @Test public void updateAllFixturesTest() throws IOException { APIFootballUpdater updater = new APIFootballUpdater(2021); - updater.updateAllFixtures("Tippliga.json"); - updater.updateAllFixtures("WTL_Pokal.json"); + // updater.updateAllFixtures("Tippliga.json"); + // updater.updateAllFixtures("WTL_Pokal.json"); } @Test public void updateAllRoundsTest() throws IOException { APIFootballUpdater updater = new APIFootballUpdater(2021); - updater.updateAllRounds("Tippliga.json"); - updater.updateAllRounds("WTL_Pokal.json"); + // updater.updateAllRounds("Tippliga.json"); + // updater.updateAllRounds("WTL_Pokal.json"); } } diff --git a/src/test/java/de/jeyp91/googlecalendar/GoogleCalendarConnectorTest.java b/src/test/java/de/jeyp91/googlecalendar/GoogleCalendarConnectorTest.java index 3ff4474..6ff2316 100644 --- a/src/test/java/de/jeyp91/googlecalendar/GoogleCalendarConnectorTest.java +++ b/src/test/java/de/jeyp91/googlecalendar/GoogleCalendarConnectorTest.java @@ -31,6 +31,6 @@ public class GoogleCalendarConnectorTest { @Test public void createEventTest() { TLWMatchday matchday = new TLWMatchday(2020, 1, 1, 0, "2020-07-01 20:30:00", "", "", "", 1); - GoogleCalendarConnector.createNewEvent(matchday); + // GoogleCalendarConnector.createNewEvent(matchday); } } diff --git a/tokens/StoredCredential b/tokens/StoredCredential index 140ce01..91db770 100644 Binary files a/tokens/StoredCredential and b/tokens/StoredCredential differ