Compare commits
225
Commits
main
..
72c0c0e895
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72c0c0e895 | ||
|
|
f0631cb53e | ||
|
|
2b008bbd82 | ||
|
|
dee4f34f60 | ||
|
|
95ea00dad5 | ||
|
|
245d535a55 | ||
|
|
476051409e | ||
|
|
dc1ebb2b57 | ||
|
|
b29e9a813b | ||
|
|
2233c91d8c | ||
|
|
7f2558155d | ||
|
|
00ea7e18e8 | ||
|
|
2c81d0cac3 | ||
|
|
ece15b8648 | ||
|
|
e0bfc47032 | ||
|
|
c35d28951e | ||
|
|
9c060863f6 | ||
|
|
c6f070bdab | ||
|
|
dd62417977 | ||
|
|
f0c75e9e2b | ||
|
|
9506a9b370 | ||
|
|
01215cd5a8 | ||
|
|
284c5d82f8 | ||
|
|
d8a6355587 | ||
|
|
1bad009063 | ||
|
|
f8a46c9ad6 | ||
|
|
32bc791bd0 | ||
|
|
38fba7b906 | ||
|
|
258ff19064 | ||
|
|
a3882ab42b | ||
|
|
6f0eaf9355 | ||
|
|
71fbe558be | ||
|
|
1a83102652 | ||
|
|
baffe58204 | ||
|
|
bed7c64189 | ||
|
|
a1fea88de6 | ||
|
|
091f8730d0 | ||
|
|
a697ef0e88 | ||
|
|
cf35b899a1 | ||
|
|
dabedcfbb1 | ||
|
|
163b313649 | ||
|
|
dd0f8128a6 | ||
|
|
57c9076c04 | ||
|
|
db6f20c339 | ||
|
|
237d71c03d | ||
|
|
8a15e8d8a8 | ||
|
|
81e1142533 | ||
|
|
1236632a2a | ||
|
|
356742fb3a | ||
|
|
adae524312 | ||
|
|
b77d425f58 | ||
|
|
662850c35c | ||
|
|
0d5307cf1a | ||
|
|
1889be5b14 | ||
|
|
10b5cc2f9c | ||
|
|
420196509c | ||
|
|
bbf7cdc9e8 | ||
|
|
e591444955 | ||
|
|
c96851459d | ||
|
|
b394fd0baf | ||
|
|
e9ed32bb26 | ||
|
|
67a0576e4d | ||
|
|
42c390e4ce | ||
|
|
eb996dd004 | ||
|
|
f599aa1954 | ||
|
|
145aa5083c | ||
|
|
35e2fd44a5 | ||
|
|
ba68057c0f | ||
|
|
b411f5d57f | ||
|
|
29f00f39aa | ||
|
|
23cef6f545 | ||
|
|
2acc6acafe | ||
|
|
cbc4b4ff76 | ||
|
|
fbca245326 | ||
|
|
2514200eeb | ||
|
|
7c90434f0f | ||
|
|
d2ed44cc9a | ||
|
|
04f0188c3f | ||
|
|
a06efd5355 | ||
|
|
9cf286db39 | ||
|
|
4dcd994ac9 | ||
|
|
98b9321c12 | ||
|
|
7b721a5592 | ||
|
|
10c90e7d04 | ||
|
|
b1c95784ef | ||
|
|
d30ec92bb5 | ||
|
|
6ac9203fa1 | ||
|
|
b96b34e1a1 | ||
|
|
ee7a3004b3 | ||
|
|
4a024c4476 | ||
|
|
4c3f18f852 | ||
|
|
12164c03ae | ||
|
|
d078a182a1 | ||
|
|
ed69935657 | ||
|
|
3d4fd84a0a | ||
|
|
6e82e05298 | ||
|
|
3b3f8e7162 | ||
|
|
19e928e723 | ||
|
|
ef7f36982a | ||
|
|
7c869b8410 | ||
|
|
79d41f0f8a | ||
|
|
7516d802ca | ||
|
|
76adb595d5 | ||
|
|
102f2b8ba3 | ||
|
|
12aec6c37f | ||
|
|
5ea6511a48 | ||
|
|
95d71fa813 | ||
|
|
4220fd06cb | ||
|
|
632a39cd5d | ||
|
|
decf60fb0a | ||
|
|
7c5bbe65e5 | ||
|
|
3f10de8225 | ||
|
|
dac3f31a37 | ||
|
|
87c3dd21c6 | ||
|
|
d7296a5634 | ||
|
|
a9fcf76a85 | ||
|
|
37e5317d72 | ||
|
|
c301923c24 | ||
|
|
752b3253d9 | ||
|
|
3095dbd0e5 | ||
|
|
e286d1029c | ||
|
|
26b7545517 | ||
|
|
63ff6838de | ||
|
|
f5ef53aefd | ||
|
|
6ca8693258 | ||
|
|
b5fb2d6842 | ||
|
|
0c63d45dd6 | ||
|
|
61d6597578 | ||
|
|
c76a972286 | ||
|
|
34f906f622 | ||
|
|
e7a74694ba | ||
|
|
13effb5d59 | ||
|
|
ea2697e114 | ||
|
|
8ba07bab8e | ||
|
|
6099b55f6c | ||
|
|
363dd073e8 | ||
|
|
d9616956ee | ||
|
|
71546bd499 | ||
|
|
67ea5c7d97 | ||
|
|
f349b92973 | ||
|
|
f9c06971f0 | ||
|
|
c833f373bd | ||
|
|
54f1129021 | ||
|
|
0d640bd61d | ||
|
|
b76e125d31 | ||
|
|
2f0385f1f5 | ||
|
|
1c99d0a468 | ||
|
|
952f869f59 | ||
|
|
c959d62116 | ||
|
|
089b8eba08 | ||
|
|
af28e5cb6f | ||
|
|
287b96f03b | ||
|
|
76db3ba9d3 | ||
|
|
5ef306c853 | ||
|
|
3945b471b2 | ||
|
|
f8b53cfe52 | ||
|
|
824e0f35be | ||
|
|
d54a7089c8 | ||
|
|
14b45f638d | ||
|
|
70db634f10 | ||
|
|
cbcaeda25f | ||
|
|
23ad175f98 | ||
|
|
6fe026ee74 | ||
|
|
4f638c3111 | ||
|
|
0578c6ecbc | ||
|
|
221a2157cf | ||
|
|
50ba1198c7 | ||
|
|
4bd7af39a8 | ||
|
|
37030a67ec | ||
|
|
b100e4e2e8 | ||
|
|
a6145eed64 | ||
|
|
dbd2eb1737 | ||
|
|
27193999fc | ||
|
|
87c0383db8 | ||
|
|
dd9c8cc0af | ||
|
|
c1e8c901cd | ||
|
|
780bcf0c98 | ||
|
|
341f914b35 | ||
|
|
10e6348dcf | ||
|
|
f1ce35dcdf | ||
|
|
c53511939d | ||
|
|
5474e2a4d1 | ||
|
|
7367c5c86f | ||
|
|
2fcee30597 | ||
|
|
8cfb2a325a | ||
|
|
5862a99d73 | ||
|
|
fbbac7fdb0 | ||
|
|
7e09e96cb1 | ||
|
|
d42edcf01c | ||
|
|
2f411aae67 | ||
|
|
d54e8991d7 | ||
|
|
7f98b928bd | ||
|
|
7d9fc5aac1 | ||
|
|
53af82a429 | ||
|
|
3a5df3cae6 | ||
|
|
57baee27bd | ||
|
|
1e9ee8127c | ||
|
|
306bf69107 | ||
|
|
d8e70fb1b0 | ||
|
|
6579d3c003 | ||
|
|
72a6140925 | ||
|
|
81b68b27f7 | ||
|
|
2f66771b0d | ||
|
|
c7e9cd092f | ||
|
|
b09d7ed474 | ||
|
|
cdb1f92893 | ||
|
|
1b7bcbf9b0 | ||
|
|
93cbcb75a4 | ||
|
|
16d5baabef | ||
|
|
91e5ed50b7 | ||
|
|
126b9778c0 | ||
|
|
cb01b7bcb7 | ||
|
|
e4186457e2 | ||
|
|
ae2be9c425 | ||
|
|
d8af0b3d6c | ||
|
|
f22f9a929b | ||
|
|
bce0f3800c | ||
|
|
8828f4477a | ||
|
|
5b4667e8ae | ||
|
|
557cd59c8f | ||
|
|
e57f79c18b | ||
|
|
babfe66872 | ||
|
|
9c88c28151 | ||
|
|
a484010285 | ||
|
|
283efc775b |
No files matched your search
@@ -6,4 +6,3 @@
|
|||||||
src/main/main.iml
|
src/main/main.iml
|
||||||
src/test/test.iml
|
src/test/test.iml
|
||||||
bin
|
bin
|
||||||
.env
|
|
||||||
Vendored
+6
-30
@@ -10,7 +10,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "de.jeyp91.App",
|
"mainClass": "de.jeyp91.App",
|
||||||
"envFile": "${workspaceFolder}/.env",
|
"envFile": "${workspaceFolder}/.env",
|
||||||
"args": ["--mode", "APIFootballUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
|
"args": " --mode APIFootballUpdater --season 2026 --league 1 --configFile Tippliga"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "java",
|
"type": "java",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "de.jeyp91.App",
|
"mainClass": "de.jeyp91.App",
|
||||||
"envFile": "${workspaceFolder}/.env",
|
"envFile": "${workspaceFolder}/.env",
|
||||||
"args": ["--mode", "MatchesCreatorFootball", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
|
"args": " --mode MatchesCreatorFootball --season 2026 --league 47 --configFile Relegation"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "java",
|
"type": "java",
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "de.jeyp91.App",
|
"mainClass": "de.jeyp91.App",
|
||||||
"envFile": "${workspaceFolder}/.env",
|
"envFile": "${workspaceFolder}/.env",
|
||||||
"args": ["--mode", "MatchesUpdaterFootball", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
|
"args": " --mode MatchesUpdaterFootball --season 2026 --league 48 --configFile WTL-Pokal"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "java",
|
"type": "java",
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "de.jeyp91.App",
|
"mainClass": "de.jeyp91.App",
|
||||||
"envFile": "${workspaceFolder}/.env",
|
"envFile": "${workspaceFolder}/.env",
|
||||||
"args": ["--mode", "MatchdaysUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
|
"args": " --mode MatchdaysUpdater --season 2026 --league 1 --configFile Tippliga"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "java",
|
"type": "java",
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "de.jeyp91.App",
|
"mainClass": "de.jeyp91.App",
|
||||||
"envFile": "${workspaceFolder}/.env",
|
"envFile": "${workspaceFolder}/.env",
|
||||||
"args": ["--mode", "MatchesResultsUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
|
"args": " --mode MatchesResultsUpdater --season 2026 --league 1 --configFile Tippliga"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "java",
|
"type": "java",
|
||||||
@@ -50,31 +50,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "de.jeyp91.App",
|
"mainClass": "de.jeyp91.App",
|
||||||
"envFile": "${workspaceFolder}/.env",
|
"envFile": "${workspaceFolder}/.env",
|
||||||
"args": ["--mode", "MatchesListGistUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
|
"args": " --mode MatchesListGistUpdater --season 2026 --league 1 --configFile Tippliga"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "java",
|
|
||||||
"name": "TeamsUpdater",
|
|
||||||
"request": "launch",
|
|
||||||
"mainClass": "de.jeyp91.App",
|
|
||||||
"envFile": "${workspaceFolder}/.env",
|
|
||||||
"args": ["--mode", "TeamsUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "java",
|
|
||||||
"name": "WhatsAppNotifier",
|
|
||||||
"request": "launch",
|
|
||||||
"mainClass": "de.jeyp91.App",
|
|
||||||
"envFile": "${workspaceFolder}/.env",
|
|
||||||
"args": ["--mode", "WhatsAppNotifier", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "java",
|
|
||||||
"name": "SeasonPreparation",
|
|
||||||
"request": "launch",
|
|
||||||
"mainClass": "de.jeyp91.App",
|
|
||||||
"envFile": "${workspaceFolder}/.env",
|
|
||||||
"args": ["--mode", "SeasonPreparation", "--season", "2027", "--league", "0", "--configFile", "Dummy"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Vendored
-10
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"java.compile.nullAnalysis.mode": "automatic",
|
|
||||||
"java.configuration.updateBuildConfiguration": "interactive",
|
|
||||||
"java.test.config": {
|
|
||||||
"envFile": "${workspaceFolder}/.env"
|
|
||||||
},
|
|
||||||
"java.debug.settings.onBuildFailureProceed": true,
|
|
||||||
"jdk.jdkhome": "/Users/julian/.local/share/mise/installs/java/22.0.2",
|
|
||||||
"java.debug.settings.console": "internalConsole"
|
|
||||||
}
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
<!-- headroom:rtk-instructions -->
|
|
||||||
# RTK (Rust Token Killer) - Token-Optimized Commands
|
|
||||||
|
|
||||||
When running shell commands, **always prefix with `rtk`**. This reduces context
|
|
||||||
usage by 60-90% with zero behavior change. If rtk has no filter for a command,
|
|
||||||
it passes through unchanged — so it is always safe to use.
|
|
||||||
|
|
||||||
## Key Commands
|
|
||||||
```bash
|
|
||||||
# Git (59-80% savings)
|
|
||||||
rtk git status rtk git diff rtk git log
|
|
||||||
|
|
||||||
# Files & Search (60-75% savings)
|
|
||||||
rtk ls <path> rtk read <file> rtk grep <pattern>
|
|
||||||
rtk find <pattern> rtk diff <file>
|
|
||||||
|
|
||||||
# Build (80-90% savings) — shows errors only
|
|
||||||
rtk ./gradlew build rtk ./gradlew compileJava
|
|
||||||
|
|
||||||
# Test (90-99% savings) — shows failures only
|
|
||||||
rtk ./gradlew test
|
|
||||||
|
|
||||||
# Analysis (70-90% savings)
|
|
||||||
rtk err <cmd> rtk log <file> rtk json <file>
|
|
||||||
rtk summary <cmd> rtk deps rtk env
|
|
||||||
|
|
||||||
# GitHub (26-87% savings)
|
|
||||||
rtk gh pr view <n> rtk gh run list rtk gh issue list
|
|
||||||
|
|
||||||
# Infrastructure (85% savings)
|
|
||||||
rtk docker ps rtk kubectl get rtk docker logs <c>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Rules
|
|
||||||
- In command chains, prefix each segment: `rtk git add . && rtk git commit -m "msg"`
|
|
||||||
- For debugging, use raw command without rtk prefix
|
|
||||||
- `rtk proxy <cmd>` runs command without filtering but tracks usage
|
|
||||||
<!-- /headroom:rtk-instructions -->
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# TLW Database Tool — Agent Guide
|
|
||||||
|
|
||||||
## Project Overview
|
|
||||||
Java CLI tool managing the Tippliga Würzburg football prediction league. Syncs match data from API-Football, manages MySQL database (phpBB forum), pushes Google Calendar events, sends WhatsApp reminders via OpenAI-generated messages, and uploads fixtures to S3.
|
|
||||||
|
|
||||||
## Build & Test
|
|
||||||
```bash
|
|
||||||
./gradlew build # compile + test + jar
|
|
||||||
./gradlew test # run all tests
|
|
||||||
./gradlew clean test # clean build + test
|
|
||||||
./gradlew jar # build fat JAR (all deps bundled)
|
|
||||||
./gradlew dependencies # list dependency tree
|
|
||||||
```
|
|
||||||
|
|
||||||
## Run Modes (CLI)
|
|
||||||
```
|
|
||||||
-m MatchdaysUpdater - Update delivery dates from match times
|
|
||||||
-m MatchesCreatorFootball - Create match schedule from API-Football
|
|
||||||
-m MatchesUpdaterFootball - Update match team/datetime from API-Football
|
|
||||||
-m MatchesResultsUpdater - Push match results to website
|
|
||||||
-m TeamsUpdater - Add missing teams to DB
|
|
||||||
-m APIFootballUpdater - Fetch fixtures/rounds from API-Football → S3
|
|
||||||
-m MatchesListGistUpdater - Update forum posts with fixture lists
|
|
||||||
-m PostChecksum - Print checksum of a config post
|
|
||||||
-m WhatsAppNotifier - Send WhatsApp reminders for missing bets
|
|
||||||
```
|
|
||||||
Required: `-s <season> -l <league> -c <configFile>`
|
|
||||||
|
|
||||||
## Architecture
|
|
||||||
```
|
|
||||||
App.java (CLI entry)
|
|
||||||
├── apifootball/ — API-Football HTTP client, match model, S3 caching
|
|
||||||
├── googlecalendar/ — Google Calendar API CRUD for matchday events
|
|
||||||
├── teamidmatcher/ — BiMap: Tippliga team ID ↔ API-Football team ID
|
|
||||||
├── tippliga/ — Domain models & operations (match, matchday, team, league)
|
|
||||||
├── tippligaforum/ — MySQL DB connector, phpBB forum post management
|
|
||||||
└── whatsapp/ — OpenAI-generated reminders, WhatsApp API sender
|
|
||||||
```
|
|
||||||
|
|
||||||
## Code Conventions
|
|
||||||
- Package: `de.jeyp91.*`
|
|
||||||
- SQL columns referenced by ordinal position (constants like `final int SEASON = 1`)
|
|
||||||
- Logger via SLF4J: `LoggerFactory.getLogger(Class.class)`
|
|
||||||
- Config stored as JSON in phpBB forum posts (not local files)
|
|
||||||
- API keys / secrets in environment variables
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
- JUnit 4 + TestNG
|
|
||||||
- Tests in `src/test/java/de/jeyp91/`
|
|
||||||
- Run single test: `./gradlew test --tests "de.jeyp91.apifootball.APIFootballMatchTest"`
|
|
||||||
@@ -1,136 +0,0 @@
|
|||||||
# TLW Database Tool
|
|
||||||
|
|
||||||
CLI tool for **Tippliga Würzburg** football prediction league administration. Syncs match data from [API-Football](https://www.api-football.com/), manages a MySQL database backing a phpBB forum, pushes Google Calendar events, sends WhatsApp reminders with AI-generated messages via OpenAI, and uploads fixture data to S3.
|
|
||||||
|
|
||||||
## Architecture
|
|
||||||
|
|
||||||
```
|
|
||||||
App.java (CLI entry with argparse4j)
|
|
||||||
├── apifootball/ — API-Football HTTP client, match model, S3 caching
|
|
||||||
│ ├── APIFootballUpdater Fetch raw fixtures/rounds → S3
|
|
||||||
│ ├── APIFootballConnector Singleton, reads cached S3 data, resolves matchdays
|
|
||||||
│ ├── APIFootballMatch API-Football match model (extends BaseMatch)
|
|
||||||
│ └── APIFootballMatchesProvider Resolves config entries to match lists
|
|
||||||
├── googlecalendar/ — Google Calendar API CRUD
|
|
||||||
│ ├── GoogleCalendarConnector OAuth2 + service setup
|
|
||||||
│ ├── CalendarConfigProvider Reads calendar ID/URL from JSON resource
|
|
||||||
│ └── TippligaGoogleEventManager Create/update/delete matchday events
|
|
||||||
├── teamidmatcher/ — Bi-directional ID mapping
|
|
||||||
│ ├── TeamIDMatcher HashBiMap: Tippliga team ID ↔ API-Football ID
|
|
||||||
│ └── TeamIDMatcherTemplateCreator Generates config template from API teams
|
|
||||||
├── tippliga/ — Domain models & operations
|
|
||||||
│ ├── TLWMatch / TLWMatchday / TLWTeam / TLWLeague (DB-mapped models)
|
|
||||||
│ ├── TLWMatchesCreatorFootball Build match schedule from API data
|
|
||||||
│ ├── TLWMatchesCreatorTipperLeague Build tipper-vs-tipper league matches
|
|
||||||
│ ├── TLWMatchesCreatorTipperPokal Build knockout tournament matches
|
|
||||||
│ ├── TLWMatchesUpdaterFootball Update teams/datetimes from API
|
|
||||||
│ ├── TLWMatchesResultsUpdater Push finished match results to website
|
|
||||||
│ ├── TLWMatchdaysCreator Compute delivery dates from match times
|
|
||||||
│ ├── TLWMatchdaysUpdater Write delivery date updates to DB + Calendar
|
|
||||||
│ ├── TLWTeamsCreator / TLWTeamsUpdater Team management
|
|
||||||
│ └── TLWMatchesManagerBase Shared helpers (date math, match matching)
|
|
||||||
├── tippligaforum/ — MySQL + phpBB integration
|
|
||||||
│ ├── TippligaSQLConnector Singleton JDBC connector (all queries)
|
|
||||||
│ ├── TippligaConfigProvider Reads JSON config from forum posts
|
|
||||||
│ ├── TippligaWebsiteConnector HTTP client for admin result updates
|
|
||||||
│ └── MatchesListCreator / MatchesListForumUpdater Fixture list posts
|
|
||||||
└── whatsapp/ — WhatsApp reminder system
|
|
||||||
├── WhatsAppNotifier Sends messages via WhatsApp API
|
|
||||||
├── OpenAIConnector Generates reminder text via GPT-3.5
|
|
||||||
└── WhatsAppReminder Record: user, matchday, missing bets
|
|
||||||
|
|
||||||
BaseMatch — Abstract match with status/comparison/shared fields
|
|
||||||
S3Provider — AWS S3 read/write for cached API-Football JSON
|
|
||||||
ResourceProvider — Reads JSON config files from classpath resources
|
|
||||||
StatusHolder — Global error flag
|
|
||||||
```
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
- Java 17+
|
|
||||||
- MySQL database (phpBB with Tippliga extension)
|
|
||||||
- API-Football API key (free tier)
|
|
||||||
- Google Calendar API service account + credentials file
|
|
||||||
- AWS S3 bucket for fixture caching
|
|
||||||
- WhatsApp API endpoint
|
|
||||||
|
|
||||||
### Environment Variables
|
|
||||||
| Variable | Description |
|
|
||||||
|---|---|
|
|
||||||
| `TLW_DATABASE_USERNAME` | MySQL username |
|
|
||||||
| `TLW_DATABASE_PASSWORD` | MySQL password |
|
|
||||||
| `FORUM_USERNAME` | phpBB admin username (for website connector) |
|
|
||||||
| `FORUM_PASSWORD` | phpBB admin password |
|
|
||||||
| `OPENAI_TOKEN` | OpenAI API token (GPT reminders) |
|
|
||||||
| `TLW_WHATSAPP_HOST` | WhatsApp API host |
|
|
||||||
| `TLW_WHATSAPP_PORT` | WhatsApp API port |
|
|
||||||
| `TLW_WHATSAPP_API_KEY` | WhatsApp API key |
|
|
||||||
| `AWS_ACCESS_KEY_ID` | AWS credentials (S3) |
|
|
||||||
| `AWS_SECRET_ACCESS_KEY` | AWS credentials (S3) |
|
|
||||||
|
|
||||||
### Resources
|
|
||||||
Place these in `src/main/resources/`:
|
|
||||||
- `Tippliga/Team_ID_Matcher_Config.json` — team ID mapping
|
|
||||||
- `Tippliga/Ligen_v3.json` — league definitions
|
|
||||||
- `Google_Calendar_Config.json` — calendar IDs
|
|
||||||
- `Tippliga_Configs/<config>.json` — per-season match configs
|
|
||||||
|
|
||||||
Configs are stored as phpBB forum posts (JSON wrapped in `[code]` BBCode).
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build fat JAR
|
|
||||||
./gradlew jar
|
|
||||||
|
|
||||||
# Run modes (all require -s <season> -l <league> -c <configFile>)
|
|
||||||
java -jar build/libs/tlw-database-tool-1.0.jar -m MatchdaysUpdater -s 2025 -l 1 -c tl_2025
|
|
||||||
```
|
|
||||||
|
|
||||||
### CLI Modes
|
|
||||||
|
|
||||||
| Mode | Function |
|
|
||||||
|---|---|
|
|
||||||
| `MatchdaysUpdater` | Update delivery dates from match times, sync Google Calendar |
|
|
||||||
| `MatchesCreatorFootball` | Create match schedule from API-Football |
|
|
||||||
| `MatchesUpdaterFootball` | Update match teams/datetimes from API-Football |
|
|
||||||
| `MatchesResultsUpdater` | Push finished results to website |
|
|
||||||
| `TeamsUpdater` | Add missing teams to DB |
|
|
||||||
| `APIFootballUpdater` | Fetch raw fixtures/rounds → S3 |
|
|
||||||
| `MatchesListGistUpdater` | Update forum posts with fixture lists |
|
|
||||||
| `PostChecksum` | Print MD5 checksum of a config post |
|
|
||||||
| `WhatsAppNotifier` | Send WhatsApp reminders for missing bets |
|
|
||||||
|
|
||||||
### Build Commands
|
|
||||||
```bash
|
|
||||||
./gradlew build # compile + test + jar
|
|
||||||
./gradlew test # run all tests
|
|
||||||
./gradlew clean test # clean build + test
|
|
||||||
./gradlew jar # build fat JAR
|
|
||||||
./gradlew dependencies # list dependency tree
|
|
||||||
```
|
|
||||||
|
|
||||||
## Code Conventions
|
|
||||||
- Package: `de.jeyp91.*`
|
|
||||||
- SQL columns referenced by ordinal position in ResultSet (constants like `final int SEASON = 1`)
|
|
||||||
- Logger via SLF4J: `LoggerFactory.getLogger(Class.class)`
|
|
||||||
- Match status constants inherited from `BaseMatch`
|
|
||||||
- Config JSON stored in phpBB forum posts, loaded via `TippligaConfigProvider`
|
|
||||||
- Secrets in environment variables only
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
- JUnit 4 + TestNG
|
|
||||||
- Tests under `src/test/java/de/jeyp91/`
|
|
||||||
- Run single test: `./gradlew test --tests "de.jeyp91.apifootball.APIFootballMatchTest"`
|
|
||||||
|
|
||||||
## How It Works (Data Flow)
|
|
||||||
|
|
||||||
1. **APIFootballUpdater** fetches fixtures/rounds from API-Football → caches in S3
|
|
||||||
2. **APIFootballConnector** reads cached S3 data, resolves API matchdays to Tippliga matchdays
|
|
||||||
3. **TLWMatchesCreatorFootball** config on which API matches map to which Tippliga matchdays → SQL INSERT
|
|
||||||
4. **TLWMatchdaysCreator** computes delivery deadlines from match times
|
|
||||||
5. **TLWMatchdaysUpdater** writes deadlines to DB + creates/updates Google Calendar events
|
|
||||||
6. **TLWMatchesUpdaterFootball** updates team IDs, datetimes from latest API data
|
|
||||||
7. **TLWMatchesResultsUpdater** pushes finished match results to the website via HTTP
|
|
||||||
8. **WhatsAppNotifier** queries DB for users with missing bets, generates GPT reminders, sends via WhatsApp API
|
|
||||||
@@ -37,26 +37,6 @@ dependencies {
|
|||||||
testImplementation 'org.testng:testng:7.10.2'
|
testImplementation 'org.testng:testng:7.10.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
def envFile = file('.env')
|
|
||||||
if (envFile.exists()) {
|
|
||||||
def envVars = [:]
|
|
||||||
envFile.readLines().each { line ->
|
|
||||||
def trimmed = line.trim()
|
|
||||||
if (trimmed && !trimmed.startsWith('#')) {
|
|
||||||
def parts = trimmed.split('=', 2)
|
|
||||||
if (parts.size() == 2) {
|
|
||||||
def key = parts[0].trim()
|
|
||||||
def value = parts[1].trim()
|
|
||||||
if (value.startsWith('"') && value.endsWith('"')) {
|
|
||||||
value = value.substring(1, value.length() - 1)
|
|
||||||
}
|
|
||||||
envVars[key] = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
test { environment envVars }
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes(
|
attributes(
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
# apifootball — API-Football Integration
|
|
||||||
|
|
||||||
Fetches, caches, and serves match data from [API-Football](https://www.api-football.com/). Raw JSON is cached in S3 to avoid repeated API calls.
|
|
||||||
|
|
||||||
## Classes
|
|
||||||
|
|
||||||
### APIFootballUpdater
|
|
||||||
HTTP client that fetches raw JSON from API-Football and writes to S3.
|
|
||||||
|
|
||||||
- `updateAllFixtures(season)` — fetches all leagues' fixtures
|
|
||||||
- `updateAllRounds(season)` — fetches all leagues' round metadata
|
|
||||||
- `getRawData(requestPath, season, league)` — calls API-Football with rate-limit retry
|
|
||||||
- `getLeagues()` — reads league IDs from `Ligen_v3.json` resource
|
|
||||||
|
|
||||||
Handles the Tippliga↔API-Football season offset: for most leagues, Tippliga season N corresponds to API-Football season N-1 (except World Cup `league=1` and Euro `league=4`).
|
|
||||||
|
|
||||||
### APIFootballConnector
|
|
||||||
Singleton that reads cached S3 JSON and resolves API data into `APIFootballMatch` objects.
|
|
||||||
|
|
||||||
- `getMatchDataByLeagueAndMatchday(league, matchday)` — all matches for a matchday
|
|
||||||
- `getMatchDataByLeagueAndMatchID(league, id)` — single match by API fixture ID
|
|
||||||
- `getMatchdays(leagueId)` — round metadata from S3
|
|
||||||
- `getTeamsForLeague(season, league)` — live team list from API
|
|
||||||
|
|
||||||
### APIFootballMatch
|
|
||||||
Extends `BaseMatch`. Parses a raw API-Football JSON fixture object.
|
|
||||||
|
|
||||||
Parses: fixture ID, league ID, team IDs + names, round string, datetime, status, fulltime/extratime/penalty scores.
|
|
||||||
|
|
||||||
Key method: `getMatchdayFromRoundString(season, round, leagueId)` — converts API round names (e.g. `"Regular Season - 1"`) to Tippliga matchday numbers. Falls back to the rounds JSON for non-regular-season formats.
|
|
||||||
|
|
||||||
### APIFootballMatchesProvider
|
|
||||||
High-level resolver that reads matchday config (from the JSON config file) and returns flat `APIFootballMatch` lists.
|
|
||||||
|
|
||||||
Supports two config entry types:
|
|
||||||
- `AllMatchesOfMatchday` — fetch all matches for a given API league+matchday
|
|
||||||
- `SingleMatch` — fetch a specific match by API league+fixture ID
|
|
||||||
|
|
||||||
Honors `showTable` and `ko` flags from config.
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# googlecalendar — Google Calendar Integration
|
|
||||||
|
|
||||||
Manages matchday deadline events in Google Calendar. Each matchday can have up to 3 delivery deadlines (1st, 2nd, 3rd chance).
|
|
||||||
|
|
||||||
## Classes
|
|
||||||
|
|
||||||
### GoogleCalendarConnector
|
|
||||||
Sets up the Google Calendar API service using a service account.
|
|
||||||
|
|
||||||
- Reads service account credentials from `tippliga-4e0def9ef447.json` (classpath resource)
|
|
||||||
- Uses `CalendarScopes.CALENDAR` scope
|
|
||||||
- Returns authenticated `com.google.api.services.calendar.Calendar` service
|
|
||||||
|
|
||||||
### CalendarConfigProvider
|
|
||||||
Reads calendar ID and URL from `Google_Calendar_Config.json` resource. Currently hardcoded to league 1.
|
|
||||||
|
|
||||||
### TippligaGoogleEventManager
|
|
||||||
CRUD operations for matchday deadline events.
|
|
||||||
|
|
||||||
- `createOrUpdateEventsForMatchday(matchday)` — creates/updates up to 3 events per matchday
|
|
||||||
- `createNewEvent()` / `updateEvent()` / `deleteEvent()` — individual event operations
|
|
||||||
- `deleteAllEvents(season)` — wipe all events for a season
|
|
||||||
- `updateAllMatchdays(matchdays)` — batch update; automatically deletes events for removed delivery dates
|
|
||||||
|
|
||||||
Event details:
|
|
||||||
- **Summary**: `"Tippliga Spieltag N tippen!"` (or custom matchday name)
|
|
||||||
- **Description**: season, league, matchday, delivery deadline number
|
|
||||||
- **Location**: `https://tippliga-wuerzburg.de/app.php/football/bet`
|
|
||||||
- **Time**: delivery deadline datetime, Europe/Berlin timezone
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# teamidmatcher — Team ID Mapping
|
|
||||||
|
|
||||||
Maintains a bi-directional mapping between Tippliga (phpBB) team IDs and API-Football team IDs. Uses a Guava `HashBiMap` loaded from `Team_ID_Matcher_Config.json`.
|
|
||||||
|
|
||||||
## Classes
|
|
||||||
|
|
||||||
### TeamIDMatcher
|
|
||||||
Singleton `HashBiMap<Integer, Integer>` mapping Tippliga IDs ↔ API-Football IDs.
|
|
||||||
|
|
||||||
- `getApiFootballIdFromTippligaId(id)` — Tippliga → API-Football
|
|
||||||
- `getTippligaIdFromApiFootballId(match, homeguest)` — API-Football → Tippliga, for a given match and team side
|
|
||||||
- `getTeamNameFromTippligaId(id)` — human-readable team name
|
|
||||||
|
|
||||||
Sets `StatusHolder.setError()` if a lookup fails. Used by `TLWMatch`, `TLWMatchesUpdaterFootball`, `TLWMatchesResultsUpdater`.
|
|
||||||
|
|
||||||
Config format (`Team_ID_Matcher_Config.json`):
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
{ "tippligaID": 1, "teamname": "Team Name", "apiFootballID": 12345 },
|
|
||||||
...
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
### TeamIDMatcherTemplateCreator
|
|
||||||
Utility that fetches teams from API-Football for a given league and generates a JSON config template. Useful when setting up new seasons — outputs skeleton entries with `apiFootballID` pre-filled, `tippligaID` left blank.
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
# tippliga — Domain Models & Operations
|
|
||||||
|
|
||||||
Core domain package with match, matchday, team, and league models plus operations for creating, updating, and managing the prediction league schedule. All extend `TLWMatchesManagerBase` or `TLWMatchesCreatorBase`.
|
|
||||||
|
|
||||||
## Base Classes
|
|
||||||
|
|
||||||
### BaseMatch (`de.jeyp91.BaseMatch`)
|
|
||||||
Abstract class with shared match state: team IDs, goals (home/guest/overtime/penalty), datetime, status, KO flag, show-table flag, and a `COMPARISON` enum (`IDENTICAL`, `DIFFERENT`, `DIFFERENT_DATETIME`, `DIFFERENT_RESULT`).
|
|
||||||
|
|
||||||
Status constants:
|
|
||||||
- `STATUS_NOTSTARTED = 0`
|
|
||||||
- `STATUS_STARTED = 1`
|
|
||||||
- `STATUS_PROVISIONAL_RESULT_AVAILABLE = 2`
|
|
||||||
- `STATUS_FINISHED = 3`
|
|
||||||
- `STATUS_NOT_EVALUATED = 4`
|
|
||||||
|
|
||||||
### TLWMatchesCreatorBase
|
|
||||||
Abstract creator with `TLWMatches` list, `getSQLInsertString()` generating `REPLACE INTO` queries, `getMatchesForMatchday()`, and `getNumberOfMatchdays()`.
|
|
||||||
|
|
||||||
### TLWMatchesManagerBase
|
|
||||||
Shared helpers used by updaters:
|
|
||||||
- Date parsing from TLW (`yyyy-MM-dd HH:mm:ss`) and API-Football (`yyyy-MM-dd'T'HH:mm:ss`) formats
|
|
||||||
- `getFirstMatchtimeTLW()` / `getFirstMatchtimeAPIFootball()` — earliest match in a list
|
|
||||||
- `getDaysDifference()` — calendar day diff
|
|
||||||
- `getMatchesStartingFromSecondDay()` / `getMatchesStartingFromSecondWeek()` — filter helpers for delivery date computation
|
|
||||||
- `getMatchingMatch()` — matches an API match to a TLW match by home/guest team IDs
|
|
||||||
|
|
||||||
## Domain Models
|
|
||||||
|
|
||||||
### TLWMatch (extends BaseMatch)
|
|
||||||
Full match model mapped from `phpbb_footb_matches` table. Multiple constructors:
|
|
||||||
- From `ResultSet` (DB query)
|
|
||||||
- From `APIFootballMatch` + `TeamIDMatcher` (API sync)
|
|
||||||
- Manual constructors for creators
|
|
||||||
- Copy constructor
|
|
||||||
|
|
||||||
Key methods:
|
|
||||||
- `getSQLQueryInsert()` / `getSQLQueryReplace()` — generates SQL values
|
|
||||||
- `updateMatch(APIFootballMatch)` — updates teams, goals, datetime from API data
|
|
||||||
- `isSameMatchPlaceholder()` — matches placeholder config entries to existing matches
|
|
||||||
|
|
||||||
### TLWMatchday
|
|
||||||
Mapped from `phpbb_footb_matchdays`. Fields: season, league, matchday, status, 3 delivery dates, matchday name, match count.
|
|
||||||
|
|
||||||
### TLWTeam
|
|
||||||
Mapped from `phpbb_footb_teams`. Fields: season, league, team ID, name, short name, symbol, group ID, matchday.
|
|
||||||
|
|
||||||
### TLWLeague
|
|
||||||
Mapped from `phpbb_footb_leagues`. Fields: season, league ID, league name, short name.
|
|
||||||
|
|
||||||
## Operations
|
|
||||||
|
|
||||||
### TLWMatchesCreatorFootball
|
|
||||||
Builds match schedule from API-Football data and JSON config. For each matchday config entry:
|
|
||||||
1. Resolves API matches via `APIFootballMatchesProvider`
|
|
||||||
2. Creates `TLWMatch` objects with team IDs matched via `TeamIDMatcher`
|
|
||||||
3. Fills remaining slots with placeholder matches (empty teams)
|
|
||||||
|
|
||||||
Handles `deliveryDateMode`: in `"single"` mode, matches beyond the first day get `status = -1` to prevent early betting on later matches.
|
|
||||||
|
|
||||||
### TLWMatchesCreatorTipperLeague
|
|
||||||
Creates matches for tipper-vs-tipper leagues (where tippers are "teams"). Reads pairing config from `Tipper_Match_Pair_Config.json` and tipper-team mapping from `Tipper_Team_Config.json`.
|
|
||||||
|
|
||||||
### TLWMatchesCreatorTipperPokal
|
|
||||||
Creates single-matchday knockout tournament matches from a tipper list config. Each pair of tippers is one match with `koMatch = 1` and `showTable = false`.
|
|
||||||
|
|
||||||
### TLWMatchesUpdaterFootball
|
|
||||||
Compares current DB matches with latest API data and generates SQL UPDATE statements. Only operates on matchdays where the first match is still in the future. Updates:
|
|
||||||
- Team IDs (via `TeamIDMatcher`)
|
|
||||||
- Match datetimes
|
|
||||||
- Status flags (0 = current matchday, -1 = next-day match, -2 = later)
|
|
||||||
- `show_table` / `ko_match` flags
|
|
||||||
|
|
||||||
Also handles:
|
|
||||||
- `addMissingMatches()` — inserts API matches not yet in DB (finds placeholder slots by datetime/formula)
|
|
||||||
- `addPlaceholderMatches()` — adds config-defined placeholders for TBD matchups
|
|
||||||
|
|
||||||
### TLWMatchesResultsUpdater
|
|
||||||
For finished matches, compares DB goals with API goals and pushes updates to the website via `TippligaWebsiteConnector`. Detects changes to:
|
|
||||||
- Full-time goals
|
|
||||||
- Overtime goals (for KO matches with `betKOType = 2`)
|
|
||||||
- Penalty → overtime mapping (for `betKOType = 1` or `3`)
|
|
||||||
- Status transitions from provisional to confirmed
|
|
||||||
|
|
||||||
### TLWMatchdaysCreator
|
|
||||||
Computes delivery dates (betting deadlines) from match times. Supports two modes:
|
|
||||||
- **"single"**: one deadline = first match time
|
|
||||||
- **"multiple"** (default): 3 deadlines — first match, first match of second day, first match of second week
|
|
||||||
|
|
||||||
Also handles `additionalDeliveryDate` config flags for special matchday events.
|
|
||||||
|
|
||||||
### TLWMatchdaysUpdater
|
|
||||||
Compares original DB matchdays with recomputed deadlines and generates SQL UPDATEs and Google Calendar syncs. Only updates future matchdays (deadline in the past is skipped).
|
|
||||||
|
|
||||||
### TLWTeamsCreator
|
|
||||||
Extracts unique team IDs from a list of matches and generates `REPLACE INTO phpbb_footb_teams` SQL, preserving group and matchday info from match data.
|
|
||||||
|
|
||||||
### TLWTeamsUpdater
|
|
||||||
Detects teams referenced in matches but not yet present in the league's team table. Generates INSERT SQL to add them (copies team metadata from existing entries in other seasons/leagues).
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
# tippligaforum — MySQL & phpBB Integration
|
|
||||||
|
|
||||||
Database connector, config loader, website HTTP client, and forum post management.
|
|
||||||
|
|
||||||
## Classes
|
|
||||||
|
|
||||||
### TippligaSQLConnector
|
|
||||||
Singleton JDBC connector to the phpBB MySQL database (`d0144ddb`). Connects to production via credentials from environment variables, with a fallback to localhost.
|
|
||||||
|
|
||||||
All major queries in one class:
|
|
||||||
- `getTeams()`, `getMatches()`, `getMatchdays()`, `getLeague()` — read domain objects
|
|
||||||
- `getUpdatedMatchdaysBasedOnMatches()` — complex SQL that computes delivery deadlines from match times (uses `DATEDIFF` to split deadlines across days/weeks)
|
|
||||||
- `getNextWhatsAppReminders(hours)` — multi-table query finding users with missing bets on upcoming matchdays, joins with reminder tracking to avoid duplicates
|
|
||||||
- `updatePost()` / `getPost()` / `getChecksumOfPost()` — phpBB post CRUD
|
|
||||||
- `executeQuery()` / `executeUpdate()` — raw SQL access
|
|
||||||
- `markWhatsAppReminderAsSent()` — logs sent reminders
|
|
||||||
|
|
||||||
Post updates use the phpBB checksum mechanism: `post_checksum` = MD5 of XML-escaped post text.
|
|
||||||
|
|
||||||
### TippligaConfigProvider
|
|
||||||
Reads JSON configuration from phpBB forum posts. Configs are stored as topics under the `Admin → Tippliga-Config → <season>` forum hierarchy.
|
|
||||||
|
|
||||||
- `getTippligaConfig(config)` — fetches post, strips `[code]` BBCode wrapper, parses JSON
|
|
||||||
- `getChecksumOfConfigPost(configFile)` — reads post checksum for integrity verification
|
|
||||||
|
|
||||||
### TippligaWebsiteConnector
|
|
||||||
HTTP client that logs into the phpBB frontend + admin panel and submits match results. Used by `TLWMatchesResultsUpdater`.
|
|
||||||
|
|
||||||
Login flow:
|
|
||||||
1. GET login page → extract `creation_time`, `form_token`, `sid` from hidden fields
|
|
||||||
2. POST credentials → capture session cookies
|
|
||||||
3. GET admin panel → extract admin credential token
|
|
||||||
4. POST admin login with `password_<credential>` parameter
|
|
||||||
|
|
||||||
Result submission:
|
|
||||||
1. GET results management page → extract CSRF tokens
|
|
||||||
2. POST form with season, league, matchday, match scores (home, guest, overtime)
|
|
||||||
|
|
||||||
### MatchesListCreator
|
|
||||||
Generates a JSON match list config from raw API-Football fixture data (read from S3). Creates `SingleMatch` config entries with matchday, matchtime, team names, and fixture IDs. Used by `MatchesListForumUpdater` to create fixture list forum posts.
|
|
||||||
|
|
||||||
### MatchesListForumUpdater
|
|
||||||
For each league:
|
|
||||||
1. Creates `MatchesListCreator` from S3 fixture data
|
|
||||||
2. Formats as pretty-printed JSON
|
|
||||||
3. Wraps in `[code]` BBCode
|
|
||||||
4. Finds the correct forum post (under `Admin → Tippliga-Config → <season> → Ligen → <country> <league>`)
|
|
||||||
5. Updates the post text via `TippligaSQLConnector`
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# whatsapp — WhatsApp Reminder System
|
|
||||||
|
|
||||||
Sends personalized WhatsApp reminders to users who haven't submitted their bets before the deadline. Uses OpenAI GPT-3.5 to generate natural-language reminder messages.
|
|
||||||
|
|
||||||
## Classes
|
|
||||||
|
|
||||||
### WhatsAppNotifier
|
|
||||||
Orchestrates the reminder workflow:
|
|
||||||
|
|
||||||
1. Queries DB for upcoming reminders at 2 checkpoints: **24 hours** and **2 hours** before deadline
|
|
||||||
2. For each reminder, generates a message via `OpenAIConnector`
|
|
||||||
3. Sends via WhatsApp API (HTTP POST to configurable host:port)
|
|
||||||
4. Marks sent reminders in DB to avoid duplicates
|
|
||||||
|
|
||||||
Requires env vars: `TLW_WHATSAPP_HOST`, `TLW_WHATSAPP_PORT`, `TLW_WHATSAPP_API_KEY`.
|
|
||||||
|
|
||||||
### OpenAIConnector
|
|
||||||
Caches and generates reminder text via OpenAI Chat Completions API (model `gpt-3.5-turbo-0125`).
|
|
||||||
|
|
||||||
Prompt structure:
|
|
||||||
- **System prompt** (German): "Generate a message reminding someone to submit missing tips. Must sound like a friend. Use correct singular/plural."
|
|
||||||
- **User input**: JSON with league name, matchday name, delivery day, time
|
|
||||||
- **Output template** has 2 variants — 24h deadline uses a friendly intro, 2h deadline emphasizes urgency
|
|
||||||
|
|
||||||
Message format:
|
|
||||||
```
|
|
||||||
Hey <username>,
|
|
||||||
<AI-generated intro>
|
|
||||||
Bitte gib die fehlenden Tipps bis <today/morgen> um <HH:MM> ab.
|
|
||||||
Du kannst deine Tipps wie immer unter https://tippliga-wuerzburg.de/app.php/football/bet abgeben.
|
|
||||||
Viele Grüße
|
|
||||||
Die Tippliga Admins
|
|
||||||
```
|
|
||||||
|
|
||||||
Messages are cached per (league + matchday + delivery) key to avoid repeated API calls.
|
|
||||||
|
|
||||||
### WhatsAppReminder
|
|
||||||
Java `record` with fields: season, league, leagueName, matchday, matchdayName, deliveryDate, todayTomorrow, time, remainingHours, userId, username, phoneNumber, missingBets.
|
|
||||||
|
|
||||||
Maps directly to the SQL query result from `TippligaSQLConnector.getNextWhatsAppReminders()`.
|
|
||||||
+3
-3
@@ -24,7 +24,7 @@ pipeline {
|
|||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode APIFootballUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode APIFootballUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesListGistUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesListGistUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
telegramSendManual("TLW-Database-Tool crashed in APIFootballUpdater!")
|
telegramSendManual("TLW-Database-Tool crashed!")
|
||||||
}
|
}
|
||||||
String outputString = readFile 'log.txt'
|
String outputString = readFile 'log.txt'
|
||||||
if(outputString != "") {
|
if(outputString != "") {
|
||||||
@@ -45,8 +45,8 @@ pipeline {
|
|||||||
build wait: false, job: 'TippligaUpdater'
|
build wait: false, job: 'TippligaUpdater'
|
||||||
build wait: false, job: 'WTLPokalUpdater'
|
build wait: false, job: 'WTLPokalUpdater'
|
||||||
build wait: false, job: 'SupercupUpdater'
|
build wait: false, job: 'SupercupUpdater'
|
||||||
build wait: false, job: 'RelegationUpdater'
|
// build wait: false, job: 'RelegationUpdater'
|
||||||
build wait: false, job: 'LigaCupUpdater'
|
// build wait: false, job: 'LigaCupUpdater'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-8
@@ -14,20 +14,18 @@ pipeline {
|
|||||||
withCredentials([
|
withCredentials([
|
||||||
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
||||||
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
||||||
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD')
|
||||||
string(credentialsId: 'google_calendar_private_key_id', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY_ID'),
|
|
||||||
string(credentialsId: 'google_calendar_private_key', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY')
|
|
||||||
]) {
|
]) {
|
||||||
withEnv([
|
withEnv([
|
||||||
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
||||||
]) {
|
]) {
|
||||||
try {
|
try {
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 49 --configFile WM-Tippspiel >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 49 --configFile EM-Tippspiel >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 49 --configFile WM-Tippspiel >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 49 --configFile EM-Tippspiel >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 49 --configFile WM-Tippspiel >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 49 --configFile EM-Tippspiel >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 49 --configFile WM-Tippspiel >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 49 --configFile EM-Tippspiel >> log.txt 2>&1"
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
telegramSendManual("TLW-Database-Tool crashed in LigaCupUpdater!")
|
telegramSendManual("TLW-Database-Tool crashed!")
|
||||||
}
|
}
|
||||||
String outputString = readFile 'log.txt'
|
String outputString = readFile 'log.txt'
|
||||||
if(outputString != "") {
|
if(outputString != "") {
|
||||||
|
|||||||
+3
-5
@@ -14,20 +14,18 @@ pipeline {
|
|||||||
withCredentials([
|
withCredentials([
|
||||||
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
||||||
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
||||||
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD')
|
||||||
string(credentialsId: 'google_calendar_private_key_id', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY_ID'),
|
|
||||||
string(credentialsId: 'google_calendar_private_key', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY')
|
|
||||||
]) {
|
]) {
|
||||||
withEnv([
|
withEnv([
|
||||||
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
||||||
]) {
|
]) {
|
||||||
try {
|
try {
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
|
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
|
||||||
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
telegramSendManual("TLW-Database-Tool crashed in RelegationUpdater!")
|
telegramSendManual("TLW-Database-Tool crashed!")
|
||||||
}
|
}
|
||||||
String outputString = readFile 'log.txt'
|
String outputString = readFile 'log.txt'
|
||||||
if(outputString != "") {
|
if(outputString != "") {
|
||||||
|
|||||||
+3
-5
@@ -14,20 +14,18 @@ pipeline {
|
|||||||
withCredentials([
|
withCredentials([
|
||||||
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
||||||
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
||||||
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD')
|
||||||
string(credentialsId: 'google_calendar_private_key_id', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY_ID'),
|
|
||||||
string(credentialsId: 'google_calendar_private_key', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY')
|
|
||||||
]) {
|
]) {
|
||||||
withEnv([
|
withEnv([
|
||||||
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
||||||
]) {
|
]) {
|
||||||
try {
|
try {
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
|
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
|
||||||
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
telegramSendManual("TLW-Database-Tool crashed in SupercupUpdater!")
|
telegramSendManual("TLW-Database-Tool crashed!")
|
||||||
}
|
}
|
||||||
String outputString = readFile 'log.txt'
|
String outputString = readFile 'log.txt'
|
||||||
if(outputString != "") {
|
if(outputString != "") {
|
||||||
|
|||||||
+4
-6
@@ -14,24 +14,22 @@ pipeline {
|
|||||||
withCredentials([
|
withCredentials([
|
||||||
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
||||||
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
||||||
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD')
|
||||||
string(credentialsId: 'google_calendar_private_key_id', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY_ID'),
|
|
||||||
string(credentialsId: 'google_calendar_private_key', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY')
|
|
||||||
]) {
|
]) {
|
||||||
withEnv([
|
withEnv([
|
||||||
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
||||||
]) {
|
]) {
|
||||||
try {
|
try {
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
|
||||||
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
telegramSendManual("TLW-Database-Tool crashed in TippligaUpdater!")
|
telegramSendManual("TLW-Database-Tool crashed!")
|
||||||
}
|
}
|
||||||
String outputString = readFile 'log.txt'
|
String outputString = readFile 'log.txt'
|
||||||
echo "Output: ${outputString}"
|
echo "Output: ${outputString}"
|
||||||
|
|||||||
+3
-5
@@ -14,20 +14,18 @@ pipeline {
|
|||||||
withCredentials([
|
withCredentials([
|
||||||
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
|
||||||
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
|
||||||
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD'),
|
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD')
|
||||||
string(credentialsId: 'google_calendar_private_key_id', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY_ID'),
|
|
||||||
string(credentialsId: 'google_calendar_private_key', variable: 'GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY')
|
|
||||||
]) {
|
]) {
|
||||||
withEnv([
|
withEnv([
|
||||||
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
"JAVA_HOME=${jdkPath}/jdk-22.0.2"
|
||||||
]) {
|
]) {
|
||||||
try {
|
try {
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
|
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
|
||||||
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
telegramSendManual("TLW-Database-Tool crashed in WTLPokalUpdater!")
|
telegramSendManual("TLW-Database-Tool crashed!")
|
||||||
}
|
}
|
||||||
String outputString = readFile 'log.txt'
|
String outputString = readFile 'log.txt'
|
||||||
if(outputString != "") {
|
if(outputString != "") {
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ pipeline {
|
|||||||
try {
|
try {
|
||||||
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode WhatsAppNotifier --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode WhatsAppNotifier --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
telegramSendManual("TLW-Database-Tool crashed in WhatsAppReminder!")
|
telegramSendManual("TLW-Database-Tool crashed!")
|
||||||
}
|
}
|
||||||
String outputString = readFile 'log.txt'
|
String outputString = readFile 'log.txt'
|
||||||
if(outputString != "") {
|
if(outputString != "") {
|
||||||
|
|||||||
Vendored
+2
-2
@@ -36,8 +36,8 @@ pipeline {
|
|||||||
build wait: false, job: 'TippligaUpdater'
|
build wait: false, job: 'TippligaUpdater'
|
||||||
build wait: false, job: 'WTLPokalUpdater'
|
build wait: false, job: 'WTLPokalUpdater'
|
||||||
build wait: false, job: 'SupercupUpdater'
|
build wait: false, job: 'SupercupUpdater'
|
||||||
build wait: false, job: 'RelegationUpdater'
|
// build wait: false, job: 'RelegationUpdater'
|
||||||
build wait: false, job: 'LigaCupUpdater'
|
// build wait: false, job: 'LigaCupUpdater'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import de.jeyp91.tippliga.TLWMatchesResultsUpdater;
|
|||||||
import de.jeyp91.tippliga.TLWMatchesUpdaterFootball;
|
import de.jeyp91.tippliga.TLWMatchesUpdaterFootball;
|
||||||
import de.jeyp91.tippliga.TLWTeamsUpdater;
|
import de.jeyp91.tippliga.TLWTeamsUpdater;
|
||||||
import de.jeyp91.tippligaforum.MatchesListForumUpdater;
|
import de.jeyp91.tippligaforum.MatchesListForumUpdater;
|
||||||
import de.jeyp91.tippligaforum.SeasonForumPostsCreator;
|
|
||||||
import de.jeyp91.tippligaforum.TippligaConfigProvider;
|
import de.jeyp91.tippligaforum.TippligaConfigProvider;
|
||||||
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
||||||
import de.jeyp91.whatsapp.WhatsAppNotifier;
|
import de.jeyp91.whatsapp.WhatsAppNotifier;
|
||||||
@@ -70,10 +69,6 @@ public class App {
|
|||||||
MatchesListForumUpdater matchesListForumUpdater = new MatchesListForumUpdater();
|
MatchesListForumUpdater matchesListForumUpdater = new MatchesListForumUpdater();
|
||||||
matchesListForumUpdater.updateAllLeagues(season);
|
matchesListForumUpdater.updateAllLeagues(season);
|
||||||
}
|
}
|
||||||
case "SeasonPreparation" -> {
|
|
||||||
SeasonForumPostsCreator creator = new SeasonForumPostsCreator(season);
|
|
||||||
creator.createAllPosts();
|
|
||||||
}
|
|
||||||
case "PostChecksum" -> {
|
case "PostChecksum" -> {
|
||||||
TippligaConfigProvider configProvider = new TippligaConfigProvider(season);
|
TippligaConfigProvider configProvider = new TippligaConfigProvider(season);
|
||||||
String checksum = configProvider.getChecksumOfConfigPost(configFile);
|
String checksum = configProvider.getChecksumOfConfigPost(configFile);
|
||||||
@@ -101,7 +96,7 @@ public class App {
|
|||||||
|
|
||||||
parser.addArgument("-m", "--mode")
|
parser.addArgument("-m", "--mode")
|
||||||
.dest("mode")
|
.dest("mode")
|
||||||
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "MatchesResultsUpdater", "TeamsUpdater", "APIFootballUpdater", "MatchesListGistUpdater", "PostChecksum", "WhatsAppNotifier", "SeasonPreparation")
|
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "MatchesResultsUpdater", "TeamsUpdater", "APIFootballUpdater", "MatchesListGistUpdater", "PostChecksum", "WhatsAppNotifier")
|
||||||
.help("")
|
.help("")
|
||||||
.required(true)
|
.required(true)
|
||||||
.type(String.class);
|
.type(String.class);
|
||||||
|
|||||||
@@ -1,14 +1,45 @@
|
|||||||
package de.jeyp91.googlecalendar;
|
package de.jeyp91.googlecalendar;
|
||||||
|
|
||||||
|
import com.google.common.io.Resources;
|
||||||
|
import org.json.simple.JSONObject;
|
||||||
|
import org.json.simple.parser.JSONParser;
|
||||||
|
import org.json.simple.parser.ParseException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
public class CalendarConfigProvider {
|
public class CalendarConfigProvider {
|
||||||
|
|
||||||
private static String GOOGLE_CALENDAR_ID = "825f79shtm9n3uknj99iuu2qho";
|
private static JSONObject googleCalendarConfig = null;
|
||||||
|
|
||||||
|
private static JSONObject getGoogleCalendarConfig() {
|
||||||
|
if(googleCalendarConfig == null) {
|
||||||
|
//JSON parser object to parse read file
|
||||||
|
JSONParser jsonParser = new JSONParser();
|
||||||
|
URL url = Resources.getResource("Google_Calendar_Config.json");
|
||||||
|
String jsonConfig = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
jsonConfig = Resources.toString(url, StandardCharsets.UTF_8);
|
||||||
|
//Read JSON file
|
||||||
|
googleCalendarConfig = (JSONObject) jsonParser.parse(jsonConfig);
|
||||||
|
|
||||||
|
} catch (IOException | ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return googleCalendarConfig;
|
||||||
|
}
|
||||||
|
|
||||||
public static String getCalendarUrl() {
|
public static String getCalendarUrl() {
|
||||||
return GOOGLE_CALENDAR_ID + "@group.calendar.google.com";
|
JSONObject leagueConfig = (JSONObject) getGoogleCalendarConfig().get(String.valueOf(1));
|
||||||
|
return (String) leagueConfig.get("url");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCalendarId() {
|
public static String getCalendarId() {
|
||||||
return GOOGLE_CALENDAR_ID;
|
JSONObject leagueConfig = (JSONObject) getGoogleCalendarConfig().get(String.valueOf(1));
|
||||||
|
return (String) leagueConfig.get("id");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,69 +8,33 @@ import com.google.api.services.calendar.Calendar;
|
|||||||
import com.google.api.services.calendar.CalendarScopes;
|
import com.google.api.services.calendar.CalendarScopes;
|
||||||
import com.google.auth.http.HttpCredentialsAdapter;
|
import com.google.auth.http.HttpCredentialsAdapter;
|
||||||
import com.google.auth.oauth2.GoogleCredentials;
|
import com.google.auth.oauth2.GoogleCredentials;
|
||||||
import com.google.auth.oauth2.ServiceAccountCredentials;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.*;
|
||||||
import java.net.URI;
|
|
||||||
import java.security.KeyFactory;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
import java.security.PrivateKey;
|
|
||||||
import java.security.spec.InvalidKeySpecException;
|
|
||||||
import java.security.spec.PKCS8EncodedKeySpec;
|
|
||||||
import java.util.Base64;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
public class GoogleCalendarConnector {
|
public class GoogleCalendarConnector {
|
||||||
private static final String APPLICATION_NAME = "Google Calendar API Java Quickstart";
|
private static final String APPLICATION_NAME = "Google Calendar API Java Quickstart";
|
||||||
private static final JsonFactory JSON_FACTORY = GsonFactory.getDefaultInstance();
|
private static final JsonFactory JSON_FACTORY = GsonFactory.getDefaultInstance();
|
||||||
|
|
||||||
private static final String PROJECT_ID = "tippliga";
|
/**
|
||||||
private static final String CLIENT_MAIL = "tlw-707@tippliga.iam.gserviceaccount.com";
|
* Global instance of the scopes required by this quickstart.
|
||||||
private static final String CLIENT_ID = "101590566618120833710";
|
* If modifying these scopes, delete your previously saved tokens/ folder.
|
||||||
private static final String TOKEN_URI = "https://oauth2.googleapis.com/token";
|
*/
|
||||||
|
private static final String SERVICE_CREDENTIALS_FILE_PATH = "/tippliga-4e0def9ef447.json";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an authorized Credential object.
|
||||||
|
* @return An authorized Credential object.
|
||||||
|
* @throws IOException If the Google_Credentials.json file cannot be found.
|
||||||
|
*/
|
||||||
private static GoogleCredentials getGoogleCredentials() throws IOException {
|
private static GoogleCredentials getGoogleCredentials() throws IOException {
|
||||||
String privateKeyId = getEnv("GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY_ID");
|
InputStream in = GoogleCalendarConnector.class.getResourceAsStream(SERVICE_CREDENTIALS_FILE_PATH);
|
||||||
String privateKeyPem = getEnv("GOOGLE_CALENDAR_TIPPLIGA_SERVICE_ACCOUNT_PRIVATE_KEY");
|
GoogleCredentials credentials = GoogleCredentials.fromStream(in)
|
||||||
|
|
||||||
GoogleCredentials credentials = ServiceAccountCredentials.newBuilder()
|
|
||||||
.setClientEmail(CLIENT_MAIL)
|
|
||||||
.setClientId(CLIENT_ID)
|
|
||||||
.setPrivateKey(parsePrivateKey(privateKeyPem))
|
|
||||||
.setPrivateKeyId(privateKeyId)
|
|
||||||
.setProjectId(PROJECT_ID)
|
|
||||||
.setTokenServerUri(URI.create(TOKEN_URI))
|
|
||||||
.build()
|
|
||||||
.createScoped(Collections.singleton(CalendarScopes.CALENDAR));
|
.createScoped(Collections.singleton(CalendarScopes.CALENDAR));
|
||||||
|
|
||||||
credentials.refreshIfExpired();
|
credentials.refreshIfExpired();
|
||||||
return credentials;
|
return credentials;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static PrivateKey parsePrivateKey(String pemData) throws IOException {
|
|
||||||
String normalized = pemData.replace("\\n", "\n");
|
|
||||||
String stripped = normalized
|
|
||||||
.replace("-----BEGIN PRIVATE KEY-----", "")
|
|
||||||
.replace("-----END PRIVATE KEY-----", "")
|
|
||||||
.replaceAll("\\s", "");
|
|
||||||
byte[] encoded = Base64.getDecoder().decode(stripped);
|
|
||||||
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encoded);
|
|
||||||
try {
|
|
||||||
KeyFactory kf = KeyFactory.getInstance("RSA");
|
|
||||||
return kf.generatePrivate(keySpec);
|
|
||||||
} catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
|
|
||||||
throw new IOException("Failed to parse private key", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String getEnv(String name) throws IOException {
|
|
||||||
String value = System.getenv(name);
|
|
||||||
if (value == null || value.isEmpty()) {
|
|
||||||
throw new IOException("Environment variable " + name + " is not set");
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static com.google.api.services.calendar.Calendar getSerivce() {
|
public static com.google.api.services.calendar.Calendar getSerivce() {
|
||||||
Calendar service = null;
|
Calendar service = null;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,142 @@
|
|||||||
|
package de.jeyp91.openligadb;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class OpenLigaDBConnector {
|
||||||
|
|
||||||
|
private final String OPENLIGADB_API_URL = "http://www.openligadb.de/api/";
|
||||||
|
|
||||||
|
public OpenLigaDBConnector() {}
|
||||||
|
|
||||||
|
public OpenLigaDBMatch getMatchDataOfSingleMatch(int id) {
|
||||||
|
String url = OPENLIGADB_API_URL + "getmatchdata/" + id;
|
||||||
|
JSONObject matchAsJson = getDataAsJSONObject(url);
|
||||||
|
return new OpenLigaDBMatch(matchAsJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<OpenLigaDBMatch> getMatchDataOfMatchday(int season, String league, int matchday) {
|
||||||
|
|
||||||
|
String url = OPENLIGADB_API_URL + "getmatchdata/" + league + "/" + (season - 1) + "/" + matchday;
|
||||||
|
|
||||||
|
JSONArray matches = getDataAsJSONArray(url);
|
||||||
|
ArrayList<OpenLigaDBMatch> matchesList = new ArrayList<>();
|
||||||
|
|
||||||
|
for(Object match: matches) {
|
||||||
|
matchesList.add(new OpenLigaDBMatch((JSONObject) match));
|
||||||
|
}
|
||||||
|
|
||||||
|
return matchesList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<OpenLigaDBMatch> getMatchDataOfCurrentMatchday(String league) {
|
||||||
|
|
||||||
|
String url = OPENLIGADB_API_URL + "getmatchdata/" + league;
|
||||||
|
|
||||||
|
JSONArray matches = getDataAsJSONArray(url);
|
||||||
|
ArrayList<OpenLigaDBMatch> matchesList = new ArrayList<>();
|
||||||
|
|
||||||
|
for(Object match: matches) {
|
||||||
|
matchesList.add(new OpenLigaDBMatch((JSONObject) match));
|
||||||
|
}
|
||||||
|
|
||||||
|
return matchesList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OpenLigaDBMatch getMatchDataByMatchId(int id) {
|
||||||
|
String url = OPENLIGADB_API_URL + "getmatchdata/" + id;
|
||||||
|
JSONObject match = getDataAsJSONObject(url);
|
||||||
|
return new OpenLigaDBMatch(match);
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
private 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package de.jeyp91.openligadb;
|
||||||
|
|
||||||
|
import de.jeyp91.BaseMatch;
|
||||||
|
import de.jeyp91.tippliga.TLWMatch;
|
||||||
|
import org.json.simple.JSONArray;
|
||||||
|
import org.json.simple.JSONObject;
|
||||||
|
import java.util.regex.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class OpenLigaDBMatch extends BaseMatch {
|
||||||
|
|
||||||
|
private final int RESULT_TYPE_ENDRESULT = 2;
|
||||||
|
|
||||||
|
private Integer season = null;
|
||||||
|
private int matchId;
|
||||||
|
private int leagueId;
|
||||||
|
private boolean matchIsFinished;
|
||||||
|
|
||||||
|
public OpenLigaDBMatch(JSONObject json) {
|
||||||
|
this.matchId = Integer.parseInt(json.get("MatchID").toString());
|
||||||
|
this.season = getSeasonFromLeageName(json.get("LeagueName").toString());
|
||||||
|
this.leagueId = Integer.parseInt(json.get("LeagueId").toString());
|
||||||
|
this.teamIdHome = Integer.parseInt(((JSONObject) json.get("Team1")).get("TeamId").toString());
|
||||||
|
this.teamIdGuest = Integer.parseInt(((JSONObject) json.get("Team2")).get("TeamId").toString());
|
||||||
|
for(int i = 0; i < ((JSONArray) json.get("MatchResults")).size(); i++) {
|
||||||
|
if(Integer.parseInt((((JSONObject) ((JSONArray) json.get("MatchResults")).get(i)).get("ResultTypeID")).toString()) == RESULT_TYPE_ENDRESULT) {
|
||||||
|
this.goalsHome = Integer.parseInt(((JSONObject) ((JSONArray) json.get("MatchResults")).get(i)).get("PointsTeam1").toString());
|
||||||
|
this.goalsGuest = Integer.parseInt(((JSONObject) ((JSONArray) json.get("MatchResults")).get(i)).get("PointsTeam2").toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.matchday = Integer.parseInt(((JSONObject) json.get("Group")).get("GroupOrderID").toString());
|
||||||
|
this.matchIsFinished = (Boolean) json.get("MatchIsFinished");
|
||||||
|
this.matchDatetime = (String) json.get("MatchDateTime");
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getSeasonFromLeageName(String leagueName) {
|
||||||
|
Pattern p = Pattern.compile("\\d*/\\d*");
|
||||||
|
Matcher m = p.matcher(leagueName);
|
||||||
|
m.find();
|
||||||
|
String seasonString = m.group();
|
||||||
|
p = Pattern.compile("\\d+");
|
||||||
|
m = p.matcher(seasonString);
|
||||||
|
Integer season = null;
|
||||||
|
while(m.find()) {
|
||||||
|
season = Integer.parseInt(m.group());
|
||||||
|
}
|
||||||
|
return season < 100 ? season + 2000 : season;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSameMatch(TLWMatch compareMatch) {
|
||||||
|
if(this.getSeason()!= compareMatch.getSeason()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.getMatchday() != compareMatch.getMatchday()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.getTeamIdHome() != compareMatch.getTeamIdHome()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.getTeamIdGuest() != compareMatch.getTeamIdGuest()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String thisDateTime = this.getMatchDateTime().replace("T", " ");
|
||||||
|
String tempDateTime = compareMatch.getMatchDateTime().replace("T", " ");
|
||||||
|
if(!tempDateTime.equals(thisDateTime)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.goalsHome != compareMatch.getGoalsHome() ||
|
||||||
|
this.goalsGuest != compareMatch.getGoalsGuest()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSeason() {
|
||||||
|
return this.season;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMatchId() {
|
||||||
|
return this.matchId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getMatchIsFinished() {
|
||||||
|
return this.matchIsFinished;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,13 +4,13 @@ import java.sql.ResultSet;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import de.jeyp91.App;
|
||||||
|
import de.jeyp91.BaseMatch;
|
||||||
|
import de.jeyp91.teamidmatcher.TeamIDMatcher;
|
||||||
|
import de.jeyp91.apifootball.APIFootballMatch;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import de.jeyp91.BaseMatch;
|
|
||||||
import de.jeyp91.apifootball.APIFootballMatch;
|
|
||||||
import de.jeyp91.teamidmatcher.TeamIDMatcher;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -117,18 +117,6 @@ public class TLWMatch extends BaseMatch{
|
|||||||
this.matchDatetime = matchDatetime;
|
this.matchDatetime = matchDatetime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TLWMatch(int season, int league, int matchday, int matchNo, int status, int koMatch, String formulaHome, String formulaGuest, String matchDatetime) {
|
|
||||||
this.season = season;
|
|
||||||
this.matchday = matchday;
|
|
||||||
this.league = league;
|
|
||||||
this.matchNo = matchNo;
|
|
||||||
this.status = status;
|
|
||||||
this.koMatch = koMatch;
|
|
||||||
this.formulaHome = formulaHome;
|
|
||||||
this.formulaGuest = formulaGuest;
|
|
||||||
this.matchDatetime = matchDatetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TLWMatch(int season, int league, int matchday, int matchNo, int teamIdHome, int teamIdGuest, String matchDatetime, int koMatch) {
|
public TLWMatch(int season, int league, int matchday, int matchNo, int teamIdHome, int teamIdGuest, String matchDatetime, int koMatch) {
|
||||||
this.season = season;
|
this.season = season;
|
||||||
this.matchday = matchday;
|
this.matchday = matchday;
|
||||||
@@ -191,11 +179,19 @@ public class TLWMatch extends BaseMatch{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getFormulaHome() {
|
public String getFormulaHome() {
|
||||||
return this.formulaHome != null ? this.formulaHome : "D";
|
String formula = "'D'";
|
||||||
|
if (this.formulaHome != null) {
|
||||||
|
formula = this.formulaHome;
|
||||||
|
}
|
||||||
|
return formula;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFormulaGuest() {
|
public String getFormulaGuest() {
|
||||||
return this.formulaGuest != null ? this.formulaGuest : "D";
|
String formula = "'D'";
|
||||||
|
if (this.formulaGuest != null) {
|
||||||
|
formula = this.formulaGuest;
|
||||||
|
}
|
||||||
|
return formula;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSQLQueryInsert() {
|
public String getSQLQueryInsert() {
|
||||||
@@ -214,16 +210,16 @@ public class TLWMatch extends BaseMatch{
|
|||||||
return this.season + ", " +
|
return this.season + ", " +
|
||||||
this.league + ", " +
|
this.league + ", " +
|
||||||
this.matchNo + ", " +
|
this.matchNo + ", " +
|
||||||
nullToSqlNullString(this.teamIdHome) + ", " +
|
nullToSqlEmptyString(this.teamIdHome) + ", " +
|
||||||
nullToSqlNullString(this.teamIdGuest) + ", " +
|
nullToSqlEmptyString(this.teamIdGuest) + ", " +
|
||||||
nullToSqlEmptyString(this.goalsHome) + ", " +
|
nullToSqlEmptyString(this.goalsHome) + ", " +
|
||||||
nullToSqlEmptyString(this.goalsGuest) + ", " +
|
nullToSqlEmptyString(this.goalsGuest) + ", " +
|
||||||
this.matchday + ", " +
|
this.matchday + ", " +
|
||||||
this.status + ", " +
|
this.status + ", " +
|
||||||
nullToSqlEmptyString(this.matchDatetime) + ", " +
|
nullToSqlEmptyString(this.matchDatetime) + ", " +
|
||||||
nullToSqlEmptyString(this.groupId) + ", " +
|
nullToSqlEmptyString(this.groupId) + ", " +
|
||||||
"'" + getFormulaHome() + "'" + ", " +
|
getFormulaHome() + ", " +
|
||||||
"'" + getFormulaGuest() + "'" + ", " +
|
getFormulaGuest() + ", " +
|
||||||
nullToSqlEmptyString(this.koMatch) + ", " +
|
nullToSqlEmptyString(this.koMatch) + ", " +
|
||||||
nullToSqlEmptyString(this.goalsOvertimeHome) + ", " +
|
nullToSqlEmptyString(this.goalsOvertimeHome) + ", " +
|
||||||
nullToSqlEmptyString(this.goalsOvertimeGuest) + ", " +
|
nullToSqlEmptyString(this.goalsOvertimeGuest) + ", " +
|
||||||
@@ -235,10 +231,6 @@ public class TLWMatch extends BaseMatch{
|
|||||||
return number != null ? number.toString() : "''";
|
return number != null ? number.toString() : "''";
|
||||||
}
|
}
|
||||||
|
|
||||||
private String nullToSqlNullString(Integer number) {
|
|
||||||
return number != null ? number.toString() : "0";
|
|
||||||
}
|
|
||||||
|
|
||||||
private String nullToSqlEmptyString(String string) {
|
private String nullToSqlEmptyString(String string) {
|
||||||
return string != null ? "'"+string+"'" : "''";
|
return string != null ? "'"+string+"'" : "''";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class TLWMatchdaysCreator {
|
|||||||
this.season = season;
|
this.season = season;
|
||||||
this.league = league;
|
this.league = league;
|
||||||
|
|
||||||
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(season, league, configPath);
|
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(season, 1, configPath);
|
||||||
this.matches = matchesCreator.getMatches();
|
this.matches = matchesCreator.getMatches();
|
||||||
|
|
||||||
TippligaConfigProvider prov = new TippligaConfigProvider(season);
|
TippligaConfigProvider prov = new TippligaConfigProvider(season);
|
||||||
|
|||||||
@@ -69,20 +69,6 @@ public class TLWMatchesCreatorFootball extends TLWMatchesCreatorBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add PlaceholderSingleMatch matches
|
|
||||||
for (Object matchesConfigObject : matchesConfig) {
|
|
||||||
JSONObject singleMatchConfig = (JSONObject) matchesConfigObject;
|
|
||||||
if(singleMatchConfig.get("type").equals("PlaceholderSingleMatch")) {
|
|
||||||
String formulaHome = (String) singleMatchConfig.get("formulaHome");
|
|
||||||
String formulaGuest = (String) singleMatchConfig.get("formulaGuest");
|
|
||||||
String matchDatetime = (String) singleMatchConfig.get("placeholderDatetime");
|
|
||||||
int matchNo = this.nextMatchNo;
|
|
||||||
this.nextMatchNo++;
|
|
||||||
this.TLWMatches.add(new TLWMatch(this.season, this.league, TLWMatchday, matchNo, 0, this.ko, formulaHome, formulaGuest, matchDatetime));
|
|
||||||
matchdayMatchCounter++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add empty missing matches
|
// Add empty missing matches
|
||||||
int matchesPerMatchdayTemp = 0;
|
int matchesPerMatchdayTemp = 0;
|
||||||
if(this.matchesPerMatchday != 0) {
|
if(this.matchesPerMatchday != 0) {
|
||||||
|
|||||||
@@ -44,10 +44,6 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
|
|
||||||
ArrayList<APIFootballMatch> apiFootballMatches = apiFootballMatchesProvider.getAPIFootballMatchesFromConfig((JSONObject) singleMatchdayConfig);
|
ArrayList<APIFootballMatch> apiFootballMatches = apiFootballMatchesProvider.getAPIFootballMatchesFromConfig((JSONObject) singleMatchdayConfig);
|
||||||
|
|
||||||
if(apiFootballMatches.isEmpty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<TLWMatch> tlwMatchesOriginalMatchday = tippligaSQLConnector.getMatches(String.valueOf(this.season), String.valueOf(this.league), String.valueOf(tlwMatchday));
|
ArrayList<TLWMatch> tlwMatchesOriginalMatchday = tippligaSQLConnector.getMatches(String.valueOf(this.season), String.valueOf(this.league), String.valueOf(tlwMatchday));
|
||||||
ArrayList<TLWMatch> tlwMatchesUpdatedMatchday = new ArrayList<>();
|
ArrayList<TLWMatch> tlwMatchesUpdatedMatchday = new ArrayList<>();
|
||||||
for (TLWMatch match : tlwMatchesOriginalMatchday) {
|
for (TLWMatch match : tlwMatchesOriginalMatchday) {
|
||||||
@@ -62,7 +58,9 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
LocalDateTime firstMatchOriginal = TLWMatchesManagerBase.getFirstMatchtimeTLW(tlwMatchesOriginalMatchday);
|
LocalDateTime firstMatchOriginal = TLWMatchesManagerBase.getFirstMatchtimeTLW(tlwMatchesOriginalMatchday);
|
||||||
LocalDateTime firstMatchUpdated = TLWMatchesManagerBase.getFirstMatchtimeAPIFootball(apiFootballMatches);
|
LocalDateTime firstMatchUpdated = TLWMatchesManagerBase.getFirstMatchtimeAPIFootball(apiFootballMatches);
|
||||||
|
|
||||||
if(now.isBefore(firstMatchOriginal) && now.isBefore(firstMatchUpdated)) {
|
if(apiFootballMatches.size() > 0
|
||||||
|
&& now.isBefore(firstMatchOriginal)
|
||||||
|
&& now.isBefore(firstMatchUpdated)) {
|
||||||
addMissingMatches(tlwMatchesUpdatedMatchday, apiFootballMatches);
|
addMissingMatches(tlwMatchesUpdatedMatchday, apiFootballMatches);
|
||||||
updateMatchDateTimes(tlwMatchesUpdatedMatchday, apiFootballMatches);
|
updateMatchDateTimes(tlwMatchesUpdatedMatchday, apiFootballMatches);
|
||||||
updateShowTable(tlwMatchesUpdatedMatchday, apiFootballMatches);
|
updateShowTable(tlwMatchesUpdatedMatchday, apiFootballMatches);
|
||||||
@@ -159,9 +157,6 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
ArrayList<APIFootballMatch> apiFootballMatches) {
|
ArrayList<APIFootballMatch> apiFootballMatches) {
|
||||||
|
|
||||||
ArrayList<APIFootballMatch> missingMatches = new ArrayList<>();
|
ArrayList<APIFootballMatch> missingMatches = new ArrayList<>();
|
||||||
if(!validateApiFootballTeamIds(apiFootballMatches)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(APIFootballMatch apiFootballMatch : apiFootballMatches) {
|
for(APIFootballMatch apiFootballMatch : apiFootballMatches) {
|
||||||
if(getMatchingMatch(apiFootballMatch, tlwMatches) == null) {
|
if(getMatchingMatch(apiFootballMatch, tlwMatches) == null) {
|
||||||
@@ -170,23 +165,13 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (APIFootballMatch missingMatch : missingMatches) {
|
for (APIFootballMatch missingMatch : missingMatches) {
|
||||||
Integer missingTeamIdHome = TeamIDMatcher.getTippligaIdFromApiFootballId(missingMatch, TeamIDMatcher.HOME);
|
|
||||||
Integer missingTeamIdGuest = TeamIDMatcher.getTippligaIdFromApiFootballId(missingMatch, TeamIDMatcher.GUEST);
|
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
// update placeholder match based on matching match datetime
|
// update placeholder match based on matching match datetime
|
||||||
for (TLWMatch tlwMatch : tlwMatches) {
|
for (TLWMatch tlwMatch : tlwMatches) {
|
||||||
Boolean homeMatches = tlwMatch.getTeamIdHome() == 0 || tlwMatch.getTeamIdHome().equals(missingTeamIdHome);
|
if ( tlwMatch.getTeamIdHome() == 0 && tlwMatch.getTeamIdGuest() == 0
|
||||||
Boolean guestMatches =tlwMatch.getTeamIdGuest() == 0 || tlwMatch.getTeamIdGuest().equals(missingTeamIdGuest);
|
&& Objects.equals(tlwMatch.getMatchDateTime(), missingMatch.getMatchDateTime().replace("T", " ").substring(0, 19))
|
||||||
Boolean timeMatches = Objects.equals(tlwMatch.getMatchDateTime(), missingMatch.getMatchDateTime().replace("T", " ").substring(0, 19));
|
&& !Objects.equals(tlwMatch.getFormulaHome(), "")
|
||||||
Boolean formulaHomeMatches = !Objects.equals(tlwMatch.getFormulaHome(), "");
|
&& !Objects.equals(tlwMatch.getFormulaGuest(), "")) {
|
||||||
Boolean formulaGuestMatches = !Objects.equals(tlwMatch.getFormulaGuest(), "");
|
|
||||||
if (
|
|
||||||
homeMatches
|
|
||||||
&& guestMatches
|
|
||||||
&& timeMatches
|
|
||||||
&& formulaHomeMatches
|
|
||||||
&& formulaGuestMatches
|
|
||||||
) {
|
|
||||||
tlwMatch.updateMatch(missingMatch);
|
tlwMatch.updateMatch(missingMatch);
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
@@ -195,15 +180,9 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
// update empty match
|
// update empty match
|
||||||
if(!done) {
|
if(!done) {
|
||||||
for (TLWMatch tlwMatch : tlwMatches) {
|
for (TLWMatch tlwMatch : tlwMatches) {
|
||||||
Integer teamIdHome = tlwMatch.getTeamIdHome();
|
if (tlwMatch.getTeamIdHome() == 0 && tlwMatch.getTeamIdGuest() == 0
|
||||||
Integer teamIdGuest = tlwMatch.getTeamIdGuest();
|
&& (Objects.equals(tlwMatch.getFormulaHome(), "") || Objects.equals(tlwMatch.getFormulaHome(), "D"))
|
||||||
String formulaHome = tlwMatch.getFormulaHome();
|
&& (Objects.equals(tlwMatch.getFormulaGuest(), "") || Objects.equals(tlwMatch.getFormulaGuest(), "D"))
|
||||||
String formulaGuest = tlwMatch.getFormulaGuest();
|
|
||||||
if (
|
|
||||||
(Objects.equals(teamIdHome, 0) || Objects.equals(teamIdHome, null))
|
|
||||||
&& (Objects.equals(teamIdGuest, 0) || Objects.equals(teamIdGuest, null))
|
|
||||||
&& (Objects.equals(formulaHome, "") || Objects.equals(formulaHome, "D"))
|
|
||||||
&& (Objects.equals(formulaGuest, "") || Objects.equals(formulaGuest, "D"))
|
|
||||||
) {
|
) {
|
||||||
tlwMatch.updateMatch(missingMatch);
|
tlwMatch.updateMatch(missingMatch);
|
||||||
done = true;
|
done = true;
|
||||||
@@ -337,20 +316,4 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
public String getBeautifulInfo() {
|
public String getBeautifulInfo() {
|
||||||
return this.beautifulInfo;
|
return this.beautifulInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean validateApiFootballTeamIds(ArrayList<APIFootballMatch> apiFootballMatches) {
|
|
||||||
|
|
||||||
int missing = 0;
|
|
||||||
|
|
||||||
for(APIFootballMatch apiFootballMatch : apiFootballMatches) {
|
|
||||||
if(TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch, TeamIDMatcher.HOME) == null) {
|
|
||||||
missing++;
|
|
||||||
}
|
|
||||||
if(TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch, TeamIDMatcher.GUEST) == null) {
|
|
||||||
missing++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return missing == 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,137 +0,0 @@
|
|||||||
package de.jeyp91.tippligaforum;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
public class SeasonForumPostsCreator {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SeasonForumPostsCreator.class);
|
|
||||||
private static final String EMPTY_POST_CONTENT = "[code][/code]";
|
|
||||||
|
|
||||||
private static final String[] CONFIG_POSTS = {
|
|
||||||
"Supercup Tipper",
|
|
||||||
"WTL-Pokal Tipper",
|
|
||||||
"2. Tippliga Tipper",
|
|
||||||
"1. Tippliga Tipper",
|
|
||||||
"Relegation",
|
|
||||||
"Supercup",
|
|
||||||
"WTL-Pokal",
|
|
||||||
"Tippliga"
|
|
||||||
};
|
|
||||||
|
|
||||||
private static final String[] MATCH_LIST_POSTS = {
|
|
||||||
"World UEFA Super Cup",
|
|
||||||
"World UEFA Europa Conference League",
|
|
||||||
"World UEFA Europa League",
|
|
||||||
"World UEFA Champions League",
|
|
||||||
"Austria Bundesliga",
|
|
||||||
"Portugal Primeira Liga",
|
|
||||||
"Netherlands Eredivisie",
|
|
||||||
"Turkey Süper Lig",
|
|
||||||
"France Ligue 1",
|
|
||||||
"Italy Serie A",
|
|
||||||
"Spain La Liga",
|
|
||||||
"England Premier League",
|
|
||||||
"Germany Super Cup",
|
|
||||||
"Germany Frauen Bundesliga",
|
|
||||||
"Germany U19 Bundesliga",
|
|
||||||
"Germany Regionalliga - SudWest",
|
|
||||||
"Germany Regionalliga - Bayern",
|
|
||||||
"Germany 3. Liga",
|
|
||||||
"Germany 2. Bundesliga",
|
|
||||||
"Germany Bundesliga",
|
|
||||||
"Germany DFB Pokal"
|
|
||||||
};
|
|
||||||
|
|
||||||
private final int season;
|
|
||||||
private final TippligaWebsiteConnector connector;
|
|
||||||
private final TippligaSQLConnector sqlConnector;
|
|
||||||
|
|
||||||
public SeasonForumPostsCreator(int season) {
|
|
||||||
this.season = season;
|
|
||||||
try {
|
|
||||||
this.connector = new TippligaWebsiteConnector();
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
this.sqlConnector = TippligaSQLConnector.getInstance();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void createAllPosts() {
|
|
||||||
Integer adminForumId = sqlConnector.getForumId("Admin");
|
|
||||||
if (adminForumId == null) {
|
|
||||||
logger.error("Forum 'Admin' not found. Aborting.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Integer tippligaConfigForumId = sqlConnector.getForumId("Tippliga-Config", adminForumId);
|
|
||||||
if (tippligaConfigForumId == null) {
|
|
||||||
logger.error("Forum 'Tippliga-Config' not found. Aborting.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Integer seasonForumId = sqlConnector.getForumId(String.valueOf(season), tippligaConfigForumId);
|
|
||||||
if (seasonForumId == null) {
|
|
||||||
logger.error("Forum '" + season + "' not found under Tippliga-Config. Aborting.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Integer ligenForumId = sqlConnector.getForumId("Ligen", seasonForumId);
|
|
||||||
if (ligenForumId == null) {
|
|
||||||
logger.error("Forum 'Ligen' not found under " + season + ". Aborting.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
createConfigPosts(seasonForumId);
|
|
||||||
createMatchListPosts(ligenForumId);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createConfigPosts(int seasonForumId) {
|
|
||||||
logger.info("Creating config posts in forum " + season + "...");
|
|
||||||
for (String subject : CONFIG_POSTS) {
|
|
||||||
if (postExists(seasonForumId, subject)) {
|
|
||||||
logger.info("Config post '" + subject + "' already exists. Skipping.");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
boolean success = connector.createPost(seasonForumId, subject, EMPTY_POST_CONTENT);
|
|
||||||
if (success) {
|
|
||||||
logger.info("Created config post: " + subject);
|
|
||||||
} else {
|
|
||||||
logger.error("Failed to create config post: " + subject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createMatchListPosts(int ligenForumId) {
|
|
||||||
logger.info("Creating match list posts in " + season + " > Ligen...");
|
|
||||||
for (String subject : MATCH_LIST_POSTS) {
|
|
||||||
if (postExists(ligenForumId, subject)) {
|
|
||||||
logger.info("Match list post '" + subject + "' already exists. Skipping.");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
boolean success = connector.createPost(ligenForumId, subject, EMPTY_POST_CONTENT);
|
|
||||||
if (success) {
|
|
||||||
logger.info("Created match list post: " + subject);
|
|
||||||
} else {
|
|
||||||
logger.error("Failed to create match list post: " + subject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean postExists(int forumId, String subject) {
|
|
||||||
String query = "SELECT COUNT(*) FROM phpbb_posts WHERE forum_id = " + forumId + " AND post_subject = '" + subject + "'";
|
|
||||||
ResultSet rset = sqlConnector.executeQuery(query);
|
|
||||||
try {
|
|
||||||
if (rset != null && rset.next()) {
|
|
||||||
return rset.getInt(1) > 0;
|
|
||||||
}
|
|
||||||
} catch (SQLException e) {
|
|
||||||
logger.error("Error checking if post exists", e);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -468,16 +468,12 @@ public class TippligaSQLConnector {
|
|||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMarkWhatsAppReminderAsSentQuery(WhatsAppReminder reminder) {
|
|
||||||
return """
|
|
||||||
INSERT INTO phpbb_footb_whatsapp_reminders
|
|
||||||
(season, league, matchday, delivery_date, user_id, remaining_hours)
|
|
||||||
VALUES
|
|
||||||
(""" + reminder.season() + ", " + reminder.league() + ", " + reminder.matchday() + ", '" + reminder.deliveryDate() + "', " + reminder.userId() + ", " + reminder.remainingHours() + ");";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void markWhatsAppReminderAsSent(WhatsAppReminder reminder) {
|
public void markWhatsAppReminderAsSent(WhatsAppReminder reminder) {
|
||||||
executeUpdate(getMarkWhatsAppReminderAsSentQuery(reminder));
|
String query = """
|
||||||
|
INSERT INTO phpbb_footb_whatsapp_reminders
|
||||||
|
(season, league, matchday, delivery_date, user_id, remaining_hours)
|
||||||
|
VALUES
|
||||||
|
(""" + reminder.season() + ", " + reminder.league() + ", " + reminder.matchday() + ", '" + reminder.deliveryDate() + "', " + reminder.userId() + ", " + reminder.remainingHours() + ");";
|
||||||
|
executeUpdate(query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,69 +218,6 @@ public class TippligaWebsiteConnector {
|
|||||||
this.lastFormToken = matcher.group(2);
|
this.lastFormToken = matcher.group(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean createPost(int forumId, String subject, String message) {
|
|
||||||
String url = "https://tippliga-wuerzburg.de/posting.php?mode=post&f=" + forumId;
|
|
||||||
|
|
||||||
HttpRequest req = HttpRequest.newBuilder()
|
|
||||||
.uri(URI.create(url))
|
|
||||||
.GET().build();
|
|
||||||
|
|
||||||
String reqBody = "";
|
|
||||||
try {
|
|
||||||
TimeUnit.SECONDS.sleep(1);
|
|
||||||
reqBody = client.send(req, HttpResponse.BodyHandlers.ofString()).body();
|
|
||||||
} catch (IOException | InterruptedException e) {
|
|
||||||
logger.error("Failed to fetch posting form", e);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Pattern pattern = Pattern.compile("^[\\s\\S]*<input type=\"hidden\" name=\"creation_time\" value=\"([\\d]{10})\" \\/>[\\s\\S]*<input type=\"hidden\" name=\"form_token\" value=\"([\\d\\w]{40})\" \\/>[\\s\\S]*$");
|
|
||||||
Matcher matcher = pattern.matcher(reqBody);
|
|
||||||
if (!matcher.find()) {
|
|
||||||
logger.error("Could not find CSRF tokens in posting form for forum " + forumId);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
String creationTime = matcher.group(1);
|
|
||||||
String formToken = matcher.group(2);
|
|
||||||
|
|
||||||
Map<String, String> postParameters = new HashMap<>();
|
|
||||||
postParameters.put("subject", subject);
|
|
||||||
postParameters.put("message", message);
|
|
||||||
postParameters.put("creation_time", creationTime);
|
|
||||||
postParameters.put("form_token", formToken);
|
|
||||||
postParameters.put("post", "Absenden");
|
|
||||||
postParameters.put("attach_sig", "1");
|
|
||||||
postParameters.put("enable_bbcode", "1");
|
|
||||||
postParameters.put("enable_smilies", "1");
|
|
||||||
postParameters.put("enable_magic_url", "1");
|
|
||||||
|
|
||||||
String postForm = postParameters.entrySet()
|
|
||||||
.stream()
|
|
||||||
.map(e -> e.getKey() + "=" + URLEncoder.encode(e.getValue(), StandardCharsets.UTF_8))
|
|
||||||
.collect(Collectors.joining("&"));
|
|
||||||
|
|
||||||
HttpRequest postReq = HttpRequest.newBuilder()
|
|
||||||
.uri(URI.create(url))
|
|
||||||
.headers("Content-Type", "application/x-www-form-urlencoded")
|
|
||||||
.POST(HttpRequest.BodyPublishers.ofString(postForm))
|
|
||||||
.build();
|
|
||||||
|
|
||||||
try {
|
|
||||||
TimeUnit.SECONDS.sleep(1);
|
|
||||||
HttpResponse<String> response = client.send(postReq, HttpResponse.BodyHandlers.ofString());
|
|
||||||
if (response.statusCode() == 302) {
|
|
||||||
logger.info("Created post '" + subject + "' in forum " + forumId);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
logger.error("Failed to create post '" + subject + "' in forum " + forumId + ". Status: " + response.statusCode());
|
|
||||||
return false;
|
|
||||||
} catch (IOException | InterruptedException e) {
|
|
||||||
logger.error("Failed to create post", e);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getSidFromCookie() {
|
private String getSidFromCookie() {
|
||||||
HttpCookie sidCookie = cookieStore.getCookies().get(2);
|
HttpCookie sidCookie = cookieStore.getCookies().get(2);
|
||||||
String sid = sidCookie.getValue();
|
String sid = sidCookie.getValue();
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
package de.jeyp91.whatsapp;
|
package de.jeyp91.whatsapp;
|
||||||
|
|
||||||
|
import org.json.simple.JSONArray;
|
||||||
|
import org.json.simple.JSONObject;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.json.simple.JSONArray;
|
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
|
|
||||||
import static de.jeyp91.apifootball.APIFootballConnector.stringToJSONObject;
|
import static de.jeyp91.apifootball.APIFootballConnector.stringToJSONObject;
|
||||||
|
|
||||||
public class OpenAIConnector {
|
public class OpenAIConnector {
|
||||||
private final HttpClient client;
|
private final HttpClient client;
|
||||||
private final String OPENAI_TOKEN = System.getenv("OPENAI_TOKEN");
|
private final String OPENAI_TOKEN = System.getenv("OPENAI_TOKEN");
|
||||||
private final String OPENAPI_URL = "https://api.openai.com/v1/chat/completions";
|
private final String OPENAPI_URL = "https://api.openai.com/v1/chat/completions";
|
||||||
private final String OPENAPI_MODEL = "gpt-5-nano-2025-08-07";
|
private final String OPENAPI_MODEL = "gpt-3.5-turbo-0125";
|
||||||
private final HashMap<String, String> generatedMessages = new HashMap<>();
|
private final HashMap<String, String> generatedMessages = new HashMap<>();
|
||||||
|
|
||||||
public OpenAIConnector() {
|
public OpenAIConnector() {
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package de.jeyp91.whatsapp;
|
package de.jeyp91.whatsapp;
|
||||||
|
|
||||||
|
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.json.simple.JSONObject;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
@@ -7,12 +12,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
|
||||||
|
|
||||||
public class WhatsAppNotifier {
|
public class WhatsAppNotifier {
|
||||||
private final String host = System.getenv("TLW_WHATSAPP_HOST");
|
private final String host = System.getenv("TLW_WHATSAPP_HOST");
|
||||||
private final String port = System.getenv("TLW_WHATSAPP_PORT");
|
private final String port = System.getenv("TLW_WHATSAPP_PORT");
|
||||||
@@ -35,9 +34,6 @@ public class WhatsAppNotifier {
|
|||||||
if (success) {
|
if (success) {
|
||||||
markReminderAsSent(reminder);
|
markReminderAsSent(reminder);
|
||||||
logger.info("WhatsApp Erinnerung an " + reminder.username() + " gesendet.");
|
logger.info("WhatsApp Erinnerung an " + reminder.username() + " gesendet.");
|
||||||
} else {
|
|
||||||
logFailedReminder(reminder);
|
|
||||||
logger.error("WhatsApp Nachricht senden an " + reminder.username() + " fehlgeschlagen.");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -70,13 +66,5 @@ public class WhatsAppNotifier {
|
|||||||
public void markReminderAsSent(WhatsAppReminder reminder) {
|
public void markReminderAsSent(WhatsAppReminder reminder) {
|
||||||
TippligaSQLConnector.getInstance().markWhatsAppReminderAsSent(reminder);
|
TippligaSQLConnector.getInstance().markWhatsAppReminderAsSent(reminder);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void logFailedReminder(WhatsAppReminder reminder) {
|
|
||||||
String message = openAIConnector.getReminderMessage(reminder);
|
|
||||||
String query = TippligaSQLConnector.getInstance().getMarkWhatsAppReminderAsSentQuery(reminder);
|
|
||||||
|
|
||||||
logger.info(message);
|
|
||||||
logger.info(query);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"username": "tippligawuerzburg",
|
||||||
|
"password": "1154f448eae29212971cb82ca8850f54bff23629"
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"1": {
|
||||||
|
"id": "825f79shtm9n3uknj99iuu2qho",
|
||||||
|
"url": "825f79shtm9n3uknj99iuu2qho@group.calendar.google.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"installed": {
|
||||||
|
"client_id": "267204101826-2ps9m6httllrc7mrsvml50rsfb661k87.apps.googleusercontent.com",
|
||||||
|
"project_id": "tippliga",
|
||||||
|
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
||||||
|
"token_uri": "https://oauth2.googleapis.com/token",
|
||||||
|
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
||||||
|
"client_secret": "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",
|
||||||
|
"redirect_uris": [
|
||||||
|
"urn:ietf:wg:oauth:2.0:oob",
|
||||||
|
"http://localhost"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1343,235 +1343,5 @@
|
|||||||
"teamname": "Genk",
|
"teamname": "Genk",
|
||||||
"tippligaID": 662,
|
"tippligaID": 662,
|
||||||
"apiFootballID": 742
|
"apiFootballID": 742
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Sigma Olomouc",
|
|
||||||
"tippligaID": 663,
|
|
||||||
"apiFootballID": 2250
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "AZ Alkmaar",
|
|
||||||
"tippligaID": 454,
|
|
||||||
"apiFootballID": 201
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "AEK Athens",
|
|
||||||
"tippligaID": 404,
|
|
||||||
"apiFootballID": 575
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Mexico",
|
|
||||||
"tippligaID": 916,
|
|
||||||
"apiFootballID": 16
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "South Africa",
|
|
||||||
"tippligaID": 928,
|
|
||||||
"apiFootballID": 1531
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "South Korea",
|
|
||||||
"tippligaID": 929,
|
|
||||||
"apiFootballID": 17
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Canada",
|
|
||||||
"tippligaID": 664,
|
|
||||||
"apiFootballID": 5529
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Bosnia & Herzegovina",
|
|
||||||
"tippligaID": 724,
|
|
||||||
"apiFootballID": 1113
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "USA",
|
|
||||||
"tippligaID": 931,
|
|
||||||
"apiFootballID": 2384
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Paraguay",
|
|
||||||
"tippligaID": 921,
|
|
||||||
"apiFootballID": 2380
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Qatar",
|
|
||||||
"tippligaID": 665,
|
|
||||||
"apiFootballID": 1569
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Brazil",
|
|
||||||
"tippligaID": 903,
|
|
||||||
"apiFootballID": 6
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Morocco",
|
|
||||||
"tippligaID": 707,
|
|
||||||
"apiFootballID": 31
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Haiti",
|
|
||||||
"tippligaID": 666,
|
|
||||||
"apiFootballID": 2386
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Australia",
|
|
||||||
"tippligaID": 902,
|
|
||||||
"apiFootballID": 20
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "New Zealand",
|
|
||||||
"tippligaID": 917,
|
|
||||||
"apiFootballID": 4673
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Ghana",
|
|
||||||
"tippligaID": 910,
|
|
||||||
"apiFootballID": 1504
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Panama",
|
|
||||||
"tippligaID": 705,
|
|
||||||
"apiFootballID": 11
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Colombia",
|
|
||||||
"tippligaID": 938,
|
|
||||||
"apiFootballID": 8
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Congo DR",
|
|
||||||
"tippligaID": 667,
|
|
||||||
"apiFootballID": 1508
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Uzbekistan",
|
|
||||||
"tippligaID": 668,
|
|
||||||
"apiFootballID": 1568
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Algeria",
|
|
||||||
"tippligaID": 900,
|
|
||||||
"apiFootballID": 1532
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Jordan",
|
|
||||||
"tippligaID": 669,
|
|
||||||
"apiFootballID": 1548
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Argentina",
|
|
||||||
"tippligaID": 901,
|
|
||||||
"apiFootballID": 26
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Senegal",
|
|
||||||
"tippligaID": 708,
|
|
||||||
"apiFootballID": 13
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Iraq",
|
|
||||||
"tippligaID": 670,
|
|
||||||
"apiFootballID": 1567
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Norway",
|
|
||||||
"tippligaID": 823,
|
|
||||||
"apiFootballID": 1090
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Uruguay",
|
|
||||||
"tippligaID": 930,
|
|
||||||
"apiFootballID": 7
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Cape Verde Islands",
|
|
||||||
"tippligaID": 671,
|
|
||||||
"apiFootballID": 1533
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Saudi Arabia",
|
|
||||||
"tippligaID": 703,
|
|
||||||
"apiFootballID": 23
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Egypt",
|
|
||||||
"tippligaID": 706,
|
|
||||||
"apiFootballID": 32
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Iran",
|
|
||||||
"tippligaID": 937,
|
|
||||||
"apiFootballID": 22
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Ecuador",
|
|
||||||
"tippligaID": 934,
|
|
||||||
"apiFootballID": 2382
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Curaçao",
|
|
||||||
"tippligaID": 672,
|
|
||||||
"apiFootballID": 5530
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Ivory Coast",
|
|
||||||
"tippligaID": 907,
|
|
||||||
"apiFootballID": 1501
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Japan",
|
|
||||||
"tippligaID": 914,
|
|
||||||
"apiFootballID": 12
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Tunisia",
|
|
||||||
"tippligaID": 710,
|
|
||||||
"apiFootballID": 28
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "SC St. Tönis",
|
|
||||||
"tippligaID": 673,
|
|
||||||
"apiFootballID": 19466
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Lüneburger SK Hansa",
|
|
||||||
"tippligaID": 76,
|
|
||||||
"apiFootballID": 1645
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Eintracht Trier",
|
|
||||||
"tippligaID": 46,
|
|
||||||
"apiFootballID": 1627
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "SSV Jeddeloh",
|
|
||||||
"tippligaID": 124,
|
|
||||||
"apiFootballID": 1655
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Krieschow",
|
|
||||||
"tippligaID": 675,
|
|
||||||
"apiFootballID": 14713
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Westfalia Rhynern",
|
|
||||||
"tippligaID": 676,
|
|
||||||
"apiFootballID": 14826
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "HEBC",
|
|
||||||
"tippligaID": 677,
|
|
||||||
"apiFootballID": 16078
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "Fortuna Köln",
|
|
||||||
"tippligaID": 583,
|
|
||||||
"apiFootballID": 1326
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"teamname": "NEXT TEAM",
|
|
||||||
"tippligaID": 674,
|
|
||||||
"apiFootballID": 9999999
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -288,10 +288,5 @@
|
|||||||
"team_id": 2139,
|
"team_id": 2139,
|
||||||
"team_name": "Dustin",
|
"team_name": "Dustin",
|
||||||
"team_name_short": "Dustin"
|
"team_name_short": "Dustin"
|
||||||
},
|
|
||||||
{
|
|
||||||
"team_id": 2140,
|
|
||||||
"team_name": "Marcel W.",
|
|
||||||
"team_name_short": "Marcel W."
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
{
|
|
||||||
"numberOfMatchdays": 8,
|
|
||||||
"matchesPerMatchday": 0,
|
|
||||||
"pointMode": 4,
|
|
||||||
"pointsTendency": 1,
|
|
||||||
"pointsDifference": 2,
|
|
||||||
"pointsDirectHit": 3,
|
|
||||||
"ko": 1,
|
|
||||||
"matchdayConfig": [
|
|
||||||
{
|
|
||||||
"TLWMatchday": 1,
|
|
||||||
"numberOfMatches": 24,
|
|
||||||
"matchdayName": "1. Spieltag",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 1,
|
|
||||||
"leagueMatchday": 1,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 2,
|
|
||||||
"numberOfMatches": 24,
|
|
||||||
"matchdayName": "2. Spieltag",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 1,
|
|
||||||
"leagueMatchday": 2,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 3,
|
|
||||||
"numberOfMatches": 24,
|
|
||||||
"matchdayName": "3. Spieltag",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 1,
|
|
||||||
"leagueMatchday": 3,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 4,
|
|
||||||
"numberOfMatches": 16,
|
|
||||||
"matchdayName": "Sechzentelfinale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 1,
|
|
||||||
"leagueMatchday": 4,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-06-28 21:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 5,
|
|
||||||
"numberOfMatches": 8,
|
|
||||||
"matchdayName": "Achtelfinale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 1,
|
|
||||||
"leagueMatchday": 5,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-07-04 19:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 6,
|
|
||||||
"numberOfMatches": 4,
|
|
||||||
"matchdayName": "Viertelfinale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 1,
|
|
||||||
"leagueMatchday": 6,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-07-09 22:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 7,
|
|
||||||
"numberOfMatches": 2,
|
|
||||||
"matchdayName": "Halbfinale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 1,
|
|
||||||
"leagueMatchday": 7,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-07-14 21:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 8,
|
|
||||||
"numberOfMatches": 2,
|
|
||||||
"matchdayName": "Finale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 1,
|
|
||||||
"leagueMatchday": 8,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-07-18 23:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
"numberOfMatchdays": 1,
|
|
||||||
"matchesPerMatchday": 4,
|
|
||||||
"pointMode": 4,
|
|
||||||
"pointsTendency": 1,
|
|
||||||
"pointsDifference": 2,
|
|
||||||
"pointsDirectHit": 3,
|
|
||||||
"ko": 1,
|
|
||||||
"matchdayConfig": [
|
|
||||||
{
|
|
||||||
"TLWMatchday": 1,
|
|
||||||
"matchdayName": "Relegation",
|
|
||||||
"numberOfMatches": 4,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 35,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-05-27 20:30:00",
|
|
||||||
"formulaHome": "D",
|
|
||||||
"formulaGuest": "D"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-05-31 20:30:00",
|
|
||||||
"formulaHome": "D",
|
|
||||||
"formulaGuest": "D"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 79,
|
|
||||||
"leagueMatchday": 35,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-05-28 20:30:00",
|
|
||||||
"formulaHome": "D",
|
|
||||||
"formulaGuest": "D"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-06-01 20:30:00",
|
|
||||||
"formulaHome": "D",
|
|
||||||
"formulaGuest": "D"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
{
|
|
||||||
"numberOfMatchdays": 2,
|
|
||||||
"matchesPerMatchday": 4,
|
|
||||||
"pointMode": 4,
|
|
||||||
"pointsTendency": 1,
|
|
||||||
"pointsDifference": 2,
|
|
||||||
"pointsDirectHit": 3,
|
|
||||||
"ko": 1,
|
|
||||||
"matchdayConfig": [
|
|
||||||
{
|
|
||||||
"TLWMatchday": 1,
|
|
||||||
"matchdayName": "Supercup",
|
|
||||||
"numberOfMatches": 4,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"matchday": 1,
|
|
||||||
"matchtime": "2026-08-22 20:30",
|
|
||||||
"match": "Borussia Dortmund - Bayern München",
|
|
||||||
"showTable": false,
|
|
||||||
"matchLeague": 529,
|
|
||||||
"type": "SingleMatch",
|
|
||||||
"matchId": 1582362
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matchday": 1,
|
|
||||||
"matchtime": "2026-08-22 20:30",
|
|
||||||
"match": "Borussia Dortmund - Bayern München",
|
|
||||||
"showTable": false,
|
|
||||||
"matchLeague": 529,
|
|
||||||
"type": "SingleMatch",
|
|
||||||
"matchId": 1582362
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matchday": 1,
|
|
||||||
"matchtime": "2026-08-12 21:00",
|
|
||||||
"match": "Paris Saint Germain - Aston Villa",
|
|
||||||
"showTable": false,
|
|
||||||
"matchLeague": 531,
|
|
||||||
"type": "SingleMatch",
|
|
||||||
"matchId": 1583664
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matchday": 1,
|
|
||||||
"matchtime": "2026-08-12 21:00",
|
|
||||||
"match": "Paris Saint Germain - Aston Villa",
|
|
||||||
"showTable": false,
|
|
||||||
"matchLeague": 531,
|
|
||||||
"type": "SingleMatch",
|
|
||||||
"matchId": 1583664
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"1": "Sascha",
|
|
||||||
"2": "Stefan"
|
|
||||||
}
|
|
||||||
@@ -1,434 +0,0 @@
|
|||||||
{
|
|
||||||
"numberOfMatchdays": 39,
|
|
||||||
"matchesPerMatchday": 12,
|
|
||||||
"pointMode": 4,
|
|
||||||
"pointsTendency": 1,
|
|
||||||
"pointsDifference": 2,
|
|
||||||
"pointsDirectHit": 3,
|
|
||||||
"ko": 0,
|
|
||||||
"matchdayConfig": [
|
|
||||||
{
|
|
||||||
"TLWMatchday": 1,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 79,
|
|
||||||
"leagueMatchday": 1,
|
|
||||||
"showTable": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 2,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 79,
|
|
||||||
"leagueMatchday": 2,
|
|
||||||
"showTable": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 3,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 1,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 4,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 2,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 5,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 3,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 6,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 4,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 7,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 5,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 8,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 6,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 9,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 7,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 10,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 8,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 11,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 9,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 12,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 10,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 13,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 11,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 14,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 12,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 15,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 13,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 16,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 14,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 17,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-12-26 18:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 18,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 15,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 19,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 16,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 20,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 17,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 21,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 18,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 22,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 19,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 23,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 20,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 24,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 21,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 25,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 22,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 26,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 23,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 27,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 24,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 28,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 25,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 29,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 26,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 30,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2027-03-17 18:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 31,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 27,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 32,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 28,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 33,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 29,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 34,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2027-04-14 18:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 35,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 30,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 36,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 31,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 37,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 32,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 38,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 33,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 39,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 78,
|
|
||||||
"leagueMatchday": 34,
|
|
||||||
"showTable": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"1": "Flo",
|
|
||||||
"2": "Michael",
|
|
||||||
"3": "Demian",
|
|
||||||
"4": "Sascha",
|
|
||||||
"5": "Maxi Z.",
|
|
||||||
"6": "Julian",
|
|
||||||
"7": "Dustin",
|
|
||||||
"8": "Kay",
|
|
||||||
"9": "Lukas",
|
|
||||||
"10": "Marcel U.",
|
|
||||||
"11": "TG Nürnberg",
|
|
||||||
"12": "Nicole",
|
|
||||||
"13": "Franz",
|
|
||||||
"14": "Tristan"
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"1": "Philipp",
|
|
||||||
"2": "Marcel",
|
|
||||||
"3": "Matthias",
|
|
||||||
"4": "Max",
|
|
||||||
"5": "Marcel W.",
|
|
||||||
"6": "Friedrich",
|
|
||||||
"7": "Stefan",
|
|
||||||
"8": "Armin",
|
|
||||||
"9": "Barb",
|
|
||||||
"10": "Hilde",
|
|
||||||
"11": "Olli L.",
|
|
||||||
"12": "Jimmy",
|
|
||||||
"13": "Johannes",
|
|
||||||
"14": "Patrick"
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 1, '1. Tippliga Würzburg', '1TL', 1, 39, 12, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 0, 561, 0, 1, 0.00, 0);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 2, '2. Tippliga Würzburg', '2TL', 1, 39, 12, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 0, 561, 0, 1, 0.00, 0);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 45, 'Supercup', 'SC', 2, 1, 0, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 1, 561, 0, 1, 0.00, 0);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 47, 'Relegation', 'REL', 2, 1, 0, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 1, 561, 0, 1, 0.00, 1);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 48, 'WTL-Pokal', 'WTL', 2, 5, 0, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 0, 561, 0, 1, 0.00, 0);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 51, '1. Tippliga Würzburg', '1TL', 1, 39, 7, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 52, '2. Tippliga Würzburg', '2TL', 1, 39, 7, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 95, 'Supercup', 'SC', 2, 2, 0, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 97, 'Relegation', 'REL', 2, 1, 0, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
|
|
||||||
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 98, 'WTL-Pokal', 'WTL', 2, 6, 0, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
|
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
{
|
|
||||||
"numberOfMatchdays": 5,
|
|
||||||
"matchesPerMatchday": 0,
|
|
||||||
"pointMode": 4,
|
|
||||||
"pointsTendency": 1,
|
|
||||||
"pointsDifference": 2,
|
|
||||||
"pointsDirectHit": 3,
|
|
||||||
"ko": 1,
|
|
||||||
"matchdayConfig": [
|
|
||||||
{
|
|
||||||
"TLWMatchday": 1,
|
|
||||||
"matchdayName": "1. Runde",
|
|
||||||
"numberOfMatches": 32,
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 81,
|
|
||||||
"leagueMatchday": 1,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-08-21 18:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 2,
|
|
||||||
"numberOfMatches": 16,
|
|
||||||
"matchdayName": "Achtelfinale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 81,
|
|
||||||
"leagueMatchday": 2,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-10-27 18:00:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 3,
|
|
||||||
"numberOfMatches": 8,
|
|
||||||
"matchdayName": "Viertelfinale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 81,
|
|
||||||
"leagueMatchday": 3,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2026-12-01 18:30:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 4,
|
|
||||||
"numberOfMatches": 4,
|
|
||||||
"matchdayName": "Halbfinale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 81,
|
|
||||||
"leagueMatchday": 4,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Placeholder",
|
|
||||||
"placeholderDatetime": "2027-02-02 18:30:00"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TLWMatchday": 5,
|
|
||||||
"numberOfMatches": 6,
|
|
||||||
"matchdayName": "Finale",
|
|
||||||
"matchesConfig": [
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 81,
|
|
||||||
"leagueMatchday": 5,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 81,
|
|
||||||
"leagueMatchday": 5,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 81,
|
|
||||||
"leagueMatchday": 6,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "AllMatchesOfMatchday",
|
|
||||||
"matchesLeague": 81,
|
|
||||||
"leagueMatchday": 6,
|
|
||||||
"showTable": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-04-20 20:45:00",
|
|
||||||
"formulaHome": "D",
|
|
||||||
"formulaGuest": "D"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-04-20 20:45:00",
|
|
||||||
"formulaHome": "D",
|
|
||||||
"formulaGuest": "D"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-04-21 20:45:00",
|
|
||||||
"formulaHome": "D",
|
|
||||||
"formulaGuest": "D"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-04-21 20:45:00",
|
|
||||||
"formulaHome": "D",
|
|
||||||
"formulaGuest": "D"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-05-29 20:00:00",
|
|
||||||
"formulaHome": "W 61",
|
|
||||||
"formulaGuest": "W 63"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PlaceholderSingleMatch",
|
|
||||||
"koMatch": true,
|
|
||||||
"placeholderDatetime": "2027-05-29 20:00:00",
|
|
||||||
"formulaHome": "W 62",
|
|
||||||
"formulaGuest": "W 64"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"1": "Matthias",
|
|
||||||
"2": "Marcel U.",
|
|
||||||
"3": "Marcel",
|
|
||||||
"4": "Dustin",
|
|
||||||
"5": "Johannes",
|
|
||||||
"6": "Tristan",
|
|
||||||
"7": "Philipp",
|
|
||||||
"8": "Nicole",
|
|
||||||
"9": "Barb",
|
|
||||||
"10": "TG Nürnberg",
|
|
||||||
"11": "Marcel W.",
|
|
||||||
"12": "Maxi Z.",
|
|
||||||
"13": "Olli L.",
|
|
||||||
"14": "Lukas",
|
|
||||||
"15": "Jimmy",
|
|
||||||
"16": "Franz",
|
|
||||||
"17": "Armin",
|
|
||||||
"18": "Demian",
|
|
||||||
"19": "Hilde",
|
|
||||||
"20": "Kay",
|
|
||||||
"21": "Patrick",
|
|
||||||
"22": "Flo",
|
|
||||||
"23": "Stefan",
|
|
||||||
"24": "Max"
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
UPDATE phpbb_footb_matchdays SET status = 0 WHERE season = 2027 AND status > 0;
|
|
||||||
UPDATE phpbb_footb_matches SET status = 0 WHERE season = 2027 AND status > 0;
|
|
||||||
@@ -0,0 +1,297 @@
|
|||||||
|
{
|
||||||
|
"numberOfMatchdays": 7,
|
||||||
|
"matchesPerMatchday": 0,
|
||||||
|
"pointMode": 4,
|
||||||
|
"pointsTendency": 1,
|
||||||
|
"pointsDifference": 2,
|
||||||
|
"pointsDirectHit": 3,
|
||||||
|
"ko": 0,
|
||||||
|
"matchdayConfig": [
|
||||||
|
{
|
||||||
|
"TLWMatchday": 1,
|
||||||
|
"numberOfMatches": 12,
|
||||||
|
"matchdayName": "1. Spieltag",
|
||||||
|
"matchesConfig": [
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 1,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 2,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 3,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 4,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 5,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 6,
|
||||||
|
"showTable": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 2,
|
||||||
|
"numberOfMatches": 12,
|
||||||
|
"matchdayName": "2. Spieltag",
|
||||||
|
"matchesConfig": [
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 7,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 8,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 9,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 10,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 11,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 12,
|
||||||
|
"showTable": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 3,
|
||||||
|
"numberOfMatches": 12,
|
||||||
|
"matchdayName": "3. Spieltag",
|
||||||
|
"matchesConfig": [
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 13,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 14,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 15,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 16,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 17,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 18,
|
||||||
|
"showTable": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 4,
|
||||||
|
"numberOfMatches": 8,
|
||||||
|
"matchdayName": "Achtelfinale",
|
||||||
|
"matchesConfig": [
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 19,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-06-29 18:00:00",
|
||||||
|
"formulaHome": "G A2",
|
||||||
|
"formulaGuest": "G B2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-06-29 21:00:00",
|
||||||
|
"formulaHome": "G A1",
|
||||||
|
"formulaGuest": "G C2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-06-30 18:00:00",
|
||||||
|
"formulaHome": "G C1",
|
||||||
|
"formulaGuest": "D"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-06-30 21:00:00",
|
||||||
|
"formulaHome": "G B1",
|
||||||
|
"formulaGuest": "D"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-01 18:00:00",
|
||||||
|
"formulaHome": "G D2",
|
||||||
|
"formulaGuest": "G E2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-01 21:00:00",
|
||||||
|
"formulaHome": "G F1",
|
||||||
|
"formulaGuest": "D"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-02 18:00:00",
|
||||||
|
"formulaHome": "G E1",
|
||||||
|
"formulaGuest": "D"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-02 21:00:00",
|
||||||
|
"formulaHome": "G D1",
|
||||||
|
"formulaGuest": "G F2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 5,
|
||||||
|
"numberOfMatches": 4,
|
||||||
|
"matchdayName": "Viertelfinale",
|
||||||
|
"matchesConfig": [
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 20,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-05 18:00:00",
|
||||||
|
"formulaHome": "W 40",
|
||||||
|
"formulaGuest": "W 38"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-05 21:00:00",
|
||||||
|
"formulaHome": "W 42",
|
||||||
|
"formulaGuest": "W 41"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-06 18:00:00",
|
||||||
|
"formulaHome": "W 39",
|
||||||
|
"formulaGuest": "W 37"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-06 21:00:00",
|
||||||
|
"formulaHome": "W 43",
|
||||||
|
"formulaGuest": "W 44"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 6,
|
||||||
|
"numberOfMatches": 2,
|
||||||
|
"matchdayName": "Halbfinale",
|
||||||
|
"matchesConfig": [
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 21,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-09 21:00:00",
|
||||||
|
"formulaHome": "W 45",
|
||||||
|
"formulaGuest": "W 46"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-10 21:00:00",
|
||||||
|
"formulaHome": "W 48",
|
||||||
|
"formulaGuest": "W 47"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 7,
|
||||||
|
"numberOfMatches": 1,
|
||||||
|
"matchdayName": "Finale",
|
||||||
|
"matchesConfig": [
|
||||||
|
{
|
||||||
|
"type": "AllMatchesOfMatchday",
|
||||||
|
"matchesLeague": 5858,
|
||||||
|
"leagueMatchday": 22,
|
||||||
|
"showTable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PlaceholderSingleMatch",
|
||||||
|
"koMatch": true,
|
||||||
|
"placeholderDatetime": "2024-07-14 21:00:00",
|
||||||
|
"formulaHome": "W 49",
|
||||||
|
"formulaGuest": "W 50"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"type": "service_account",
|
||||||
|
"project_id": "tippliga",
|
||||||
|
"private_key_id": "4e0def9ef4474114744a1fcaffae9e75689a8909",
|
||||||
|
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDaJeiT0eCLSq6l\nfjvNxE9EnHtFxvWdJOx2CsIXvBJKA7u1b95uHSNQmmunJPMstMLvTRYYYVpJWUm0\njqLd4VGUDqjXuWcNQpn62TFLSGQs8bTwIYoYsAnTWC+kuG5iSaKKzw9UiKFx0Mxv\nLAm5CjqYb87E2pz+7ihCYfaMkpppwPhz8bUbQ+iHdo85cQBcZeVpjuL+W4KT89yV\nZxsV4dGJNabLLEznA1WyhS+pGz+3N9edfANyREthrxm1cyytd3omQ/pfIl7KpGlU\nIq4eDMzlPftn+Nq9S7UfTXzxcv9Ez2cdlGMSSSbpjQBYXNEewnzXutFqfK9h2STD\nM0XaqGh9AgMBAAECggEAAzMrOWAmI8zsUmcPYANG6WMgp6NVhcV46zEP/iTroVRg\nwr+r8bJWOJj+IjCgq4hQ09a3KyYGtlXwRrrH5HPyQyTAnqLjZtZ/3lzblm2TYJmJ\nwzwcbO1+skJCAF2Dxmxh35jgTafQIQJNhxheqtrwBStVQhUIIbosPBQvkven+tUv\n4lRn494VXNxWZSGevL+3iJoNtJbjjQ8FVLafx6/vKP4mShB0UxKHqSBRtzZ5g4/n\nB8d4Vw4Ma0eEBUMDD9vOqreMdKCUoMnZIKuQwWeyiug77mBxgfmCRnsefOdyEKne\nRvalPBKEpD2PH/iud+qkuNNITFCr0I1iF6f4NElciQKBgQD/q68TvMOUE2tlgdU6\n6o6d7b+Sm4yp19f1euR0fe7+5as6Pz4KWy0zwSXAczVNDXLq44hQ4eeJMALwKvQ+\nXqCrtjc3NkVtiPXIjnqEQ/t56WBZtsrLxlNAE9yxHQPEmyRMKjGOJTRpoNZzGBsS\naEqTiKinO7AY5xOWzXz+HVLDRQKBgQDabdmrKLJaHhboPBa5B7HJ8WCL5P5+97P6\n4WuDT7vQvyJqb3KhltdRAgMszFXsfYwyeidncQ3fxUlmMWtWlHROfjhyWQZ0jIJg\nwpTAvNqQ3HuXM2fRvM7d6Z69xE2RxVpRaAbvGUHvNohAW7Vwmoi/GV9NR6irV/ny\n1suS6SIH2QKBgHnJXEJ4nmlAvt3BdML1zC2qfKDne5/D81k5yu06t8evu1qpmXHx\ncJzAmq0LtA4aI+2DqQFuOo580kl5DJNRHBPvXmnsbjH5FasNQ4sRnw65fm39xqg+\ntpVFYND1U0Ap7qZhSu29BzRxqvV0PCEOkMeqRzwyEHYsTIZ/J9UcPrpJAoGAcNQ/\nlN8vycczNAEeB7QGzXbG1VyTbYiMSrK4c5rzPHAO2gX5o6ikTm8IrtJaLA/qJITe\n59sJPKbPNF+gv5dtwMIIbGC6KegOzOaWKj0jdaK+oKroHPo3rX+pBQNqwjq8XcKr\nmkRkv6lelkgJIEJjEruLdALpCKEoNp1niNquPnkCgYAVAkaF/8xYQ4UaBuJEJPOW\nDNXAmRrvaazU8GTv70t03VHKjhcv7b83L+n8yU3VuaqaO3bgyGIELJ2VRzVn16EH\nkUwh1W2fB1ZAmMK6V5JB7b8LCPdpCJSbQvNZAOZj4aodoNtGKM0j36rTSZJi2Rdz\nqtOSw0pEvALI62ufuNRUzA==\n-----END PRIVATE KEY-----\n",
|
||||||
|
"client_email": "tlw-707@tippliga.iam.gserviceaccount.com",
|
||||||
|
"client_id": "101590566618120833710",
|
||||||
|
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
||||||
|
"token_uri": "https://oauth2.googleapis.com/token",
|
||||||
|
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
||||||
|
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/tlw-707%40tippliga.iam.gserviceaccount.com"
|
||||||
|
}
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
{
|
||||||
|
"numberOfMatchdays": 39,
|
||||||
|
"matchesPerMatchday": 12,
|
||||||
|
"pointMode": 4,
|
||||||
|
"pointsTendency": 1,
|
||||||
|
"pointsDifference": 2,
|
||||||
|
"pointsDirectHit": 3,
|
||||||
|
"ko": 0,
|
||||||
|
"matchdayConfig": [
|
||||||
|
{
|
||||||
|
"TLWMatchday": 1,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 2,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 3,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 4,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 5,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 6,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 7,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 8,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 9,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 10,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 11,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 12,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 13,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 14,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 15,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 16,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 17,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 18,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 19,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 20,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 21,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 22,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 23,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 24,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 25,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 26,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 27,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 28,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 29,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 30,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 31,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 32,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 33,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 34,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 35,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 36,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 37,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 38,
|
||||||
|
"matchesConfig": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TLWMatchday": 39,
|
||||||
|
"matchesConfig": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ import de.jeyp91.apifootball.APIFootballMatch;
|
|||||||
import de.jeyp91.teamidmatcher.TeamIDMatcher;
|
import de.jeyp91.teamidmatcher.TeamIDMatcher;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
import org.json.simple.parser.JSONParser;
|
import org.json.simple.parser.JSONParser;
|
||||||
|
import org.json.simple.parser.ParseException;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
@@ -10,7 +11,7 @@ import static org.junit.Assert.assertEquals;
|
|||||||
public class TeamIDMatcherTest {
|
public class TeamIDMatcherTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getAPIFootballIdFromTippligaIdTest() {
|
public void getOpenLigaDbIdFromTippligaIdTest() {
|
||||||
int apiFootballId;
|
int apiFootballId;
|
||||||
|
|
||||||
apiFootballId = TeamIDMatcher.getApiFootballIdFromTippligaId(505);
|
apiFootballId = TeamIDMatcher.getApiFootballIdFromTippligaId(505);
|
||||||
@@ -22,7 +23,7 @@ public class TeamIDMatcherTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getTippligaIdFromAPIFootballIdTest() throws Exception {
|
public void getTippligaIdFromOpenLigaDbIdTest() throws Exception {
|
||||||
int tlwId;
|
int tlwId;
|
||||||
String jsonMatch = "{" +
|
String jsonMatch = "{" +
|
||||||
"\"fixture_id\":1," +
|
"\"fixture_id\":1," +
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package de.jeyp91.apifootball;
|
package de.jeyp91.apifootball;
|
||||||
|
|
||||||
|
import de.jeyp91.openligadb.OpenLigaDBConnector;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
public class APIFootballConnectorTest {
|
public class APIFootballConnectorTest {
|
||||||
/*
|
|
||||||
@Test
|
@Test
|
||||||
public void APITestGetMatchDataOfMatchdayBundesliga() {
|
public void APITestGetMatchDataOfMatchdayBundesliga() {
|
||||||
APIFootballConnector apiFootballConnector = APIFootballConnector.getAPIFootballConnectorInstance(2020);
|
APIFootballConnector apiFootballConnector = APIFootballConnector.getAPIFootballConnectorInstance(2020);
|
||||||
@@ -13,5 +14,4 @@ public class APIFootballConnectorTest {
|
|||||||
assert matchesOfMatchday.get(0).getTeamIdHome() == 744;
|
assert matchesOfMatchday.get(0).getTeamIdHome() == 744;
|
||||||
assert matchesOfMatchday.get(0).getTeamIdGuest() == 159;
|
assert matchesOfMatchday.get(0).getTeamIdGuest() == 159;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ import org.junit.Test;
|
|||||||
import static de.jeyp91.apifootball.APIFootballConnector.stringToJSONObject;
|
import static de.jeyp91.apifootball.APIFootballConnector.stringToJSONObject;
|
||||||
|
|
||||||
public class APIFootballMatchTest {
|
public class APIFootballMatchTest {
|
||||||
/*
|
|
||||||
@Test
|
@Test
|
||||||
public void withExtratime() throws Exception {
|
public void withExtratime() throws Exception {
|
||||||
String matchString = "{\"fixture_id\":958530,\"league_id\":4303,\"league\":{\"name\":\"DFB Pokal\",\"country\":\"Germany\",\"logo\":\"https:\\/\\/media-3.api-sports.io\\/football\\/leagues\\/81.png\",\"flag\":\"https:\\/\\/media-1.api-sports.io\\/flags\\/de.svg\"},\"event_date\":\"2022-10-19T18:00:00+02:00\",\"event_timestamp\":1666195200,\"firstHalfStart\":1666195200,\"secondHalfStart\":1666198800,\"round\":\"2nd Round\",\"status\":\"Match Finished\",\"statusShort\":\"PEN\",\"elapsed\":120,\"venue\":\"Home Deluxe Arena\",\"referee\":\"Frank Willenborg, Germany\",\"homeTeam\":{\"team_id\":185,\"team_name\":\"SC Paderborn 07\",\"logo\":\"https:\\/\\/media-2.api-sports.io\\/football\\/teams\\/185.png\"},\"awayTeam\":{\"team_id\":162,\"team_name\":\"Werder Bremen\",\"logo\":\"https:\\/\\/media-3.api-sports.io\\/football\\/teams\\/162.png\"},\"goalsHomeTeam\":2,\"goalsAwayTeam\":2,\"score\":{\"halftime\":\"2-0\",\"fulltime\":\"2-2\",\"extratime\":\"0-0\",\"penalty\":\"5-4\"}}";
|
String matchString = "{\"fixture_id\":958530,\"league_id\":4303,\"league\":{\"name\":\"DFB Pokal\",\"country\":\"Germany\",\"logo\":\"https:\\/\\/media-3.api-sports.io\\/football\\/leagues\\/81.png\",\"flag\":\"https:\\/\\/media-1.api-sports.io\\/flags\\/de.svg\"},\"event_date\":\"2022-10-19T18:00:00+02:00\",\"event_timestamp\":1666195200,\"firstHalfStart\":1666195200,\"secondHalfStart\":1666198800,\"round\":\"2nd Round\",\"status\":\"Match Finished\",\"statusShort\":\"PEN\",\"elapsed\":120,\"venue\":\"Home Deluxe Arena\",\"referee\":\"Frank Willenborg, Germany\",\"homeTeam\":{\"team_id\":185,\"team_name\":\"SC Paderborn 07\",\"logo\":\"https:\\/\\/media-2.api-sports.io\\/football\\/teams\\/185.png\"},\"awayTeam\":{\"team_id\":162,\"team_name\":\"Werder Bremen\",\"logo\":\"https:\\/\\/media-3.api-sports.io\\/football\\/teams\\/162.png\"},\"goalsHomeTeam\":2,\"goalsAwayTeam\":2,\"score\":{\"halftime\":\"2-0\",\"fulltime\":\"2-2\",\"extratime\":\"0-0\",\"penalty\":\"5-4\"}}";
|
||||||
@@ -20,5 +20,4 @@ public class APIFootballMatchTest {
|
|||||||
JSONObject matchJson = stringToJSONObject(matchString);
|
JSONObject matchJson = stringToJSONObject(matchString);
|
||||||
APIFootballMatch match = new APIFootballMatch(matchJson, 2023);
|
APIFootballMatch match = new APIFootballMatch(matchJson, 2023);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,8 @@ import org.junit.Test;
|
|||||||
|
|
||||||
public class APIFootballUpdaterTest {
|
public class APIFootballUpdaterTest {
|
||||||
|
|
||||||
int season = 2027;
|
int season = 2026;
|
||||||
/*
|
|
||||||
@Test
|
@Test
|
||||||
public void checkErrorsTest() {
|
public void checkErrorsTest() {
|
||||||
String rateLimitError = "{\"results\":0,\"errors\":{\"rateLimit\":\"Too many requests. Your rate limit is 10 requests per minute.\"}}";
|
String rateLimitError = "{\"results\":0,\"errors\":{\"rateLimit\":\"Too many requests. Your rate limit is 10 requests per minute.\"}}";
|
||||||
@@ -41,5 +41,4 @@ public class APIFootballUpdaterTest {
|
|||||||
APIFootballUpdater updater = new APIFootballUpdater();
|
APIFootballUpdater updater = new APIFootballUpdater();
|
||||||
updater.updateAllRounds(season);
|
updater.updateAllRounds(season);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package de.jeyp91.openligadb;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
public class OpenLigaDBConnectorTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void APITestGetMatchDataOfMatchdayBundesliga() {
|
||||||
|
OpenLigaDBConnector openLigaDBConnector = new OpenLigaDBConnector();
|
||||||
|
ArrayList<OpenLigaDBMatch> matches = openLigaDBConnector.getMatchDataOfMatchday(2020, "bl1", 1);
|
||||||
|
|
||||||
|
assertEquals(9, matches.size());
|
||||||
|
|
||||||
|
OpenLigaDBMatch match;
|
||||||
|
|
||||||
|
match = matches.get(0);
|
||||||
|
assertEquals((Integer) 55277, match.getMatchId());
|
||||||
|
assertEquals((Integer) 40, match.getTeamIdHome());
|
||||||
|
assertEquals((Integer) 54, match.getTeamIdGuest());
|
||||||
|
assertEquals((Integer) 2020, match.getSeason());
|
||||||
|
assertEquals("2019-08-16T20:30:00", match.getMatchDateTime());
|
||||||
|
assertEquals((Integer) 1, match.getMatchday());
|
||||||
|
assertEquals((Integer) 2, match.getGoalsHome());
|
||||||
|
assertEquals((Integer) 2, match.getGoalsGuest());
|
||||||
|
assertTrue(match.getMatchIsFinished());
|
||||||
|
|
||||||
|
match = matches.get(1);
|
||||||
|
assertEquals((Integer) 55278, match.getMatchId());
|
||||||
|
assertEquals((Integer) 7, match.getTeamIdHome());
|
||||||
|
assertEquals((Integer) 95, match.getTeamIdGuest());
|
||||||
|
assertEquals((Integer) 2020, match.getSeason());
|
||||||
|
assertEquals("2019-08-17T15:30:00", match.getMatchDateTime());
|
||||||
|
assertEquals((Integer) 1, match.getMatchday());
|
||||||
|
assertEquals((Integer) 5, match.getGoalsHome());
|
||||||
|
assertEquals((Integer) 1, match.getGoalsGuest());
|
||||||
|
assertTrue(match.getMatchIsFinished());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void APITestGetMatchDataOfMatchdayDFBPokal() {
|
||||||
|
OpenLigaDBConnector openLigaDBConnector = new OpenLigaDBConnector();
|
||||||
|
ArrayList<OpenLigaDBMatch> matches = openLigaDBConnector.getMatchDataOfMatchday(2020, "dfb2019", 1);
|
||||||
|
|
||||||
|
assert matches.size() == 32;
|
||||||
|
|
||||||
|
OpenLigaDBMatch match = matches.get(0);
|
||||||
|
assertEquals((Integer) 54926, match.getMatchId());
|
||||||
|
assertEquals((Integer) 563, match.getTeamIdHome());
|
||||||
|
assertEquals((Integer) 7, match.getTeamIdGuest());
|
||||||
|
assertEquals((Integer) 2020, match.getSeason());
|
||||||
|
assertEquals("2019-08-09T20:45:00", match.getMatchDateTime());
|
||||||
|
assertEquals((Integer) 1, match.getMatchday());
|
||||||
|
assertEquals((Integer) 0, match.getGoalsHome());
|
||||||
|
assertEquals((Integer) 2, match.getGoalsGuest());
|
||||||
|
assertTrue(match.getMatchIsFinished());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void APITestGetMatchDataOfSingleMatch() {
|
||||||
|
OpenLigaDBConnector openLigaDBConnector = new OpenLigaDBConnector();
|
||||||
|
OpenLigaDBMatch match = openLigaDBConnector.getMatchDataOfSingleMatch(55583);
|
||||||
|
assertEquals((Integer) 55583, match.getMatchId());
|
||||||
|
assertEquals((Integer) 16, match.getTeamIdHome());
|
||||||
|
assertEquals((Integer) 55, match.getTeamIdGuest());
|
||||||
|
assertEquals((Integer) 2020, match.getSeason());
|
||||||
|
assertEquals("2019-07-26T20:30:00", match.getMatchDateTime());
|
||||||
|
assertEquals((Integer) 1, match.getMatchday());
|
||||||
|
assertEquals((Integer) 2, match.getGoalsHome());
|
||||||
|
assertEquals((Integer) 1, match.getGoalsGuest());
|
||||||
|
assertTrue(match.getMatchIsFinished());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@ import org.junit.Test;
|
|||||||
|
|
||||||
public class TLWMatchdaysCreatorTest {
|
public class TLWMatchdaysCreatorTest {
|
||||||
|
|
||||||
int season = 2027;
|
int season = 2026;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getMatchdaysTippligaTest() {
|
public void getMatchdaysTippligaTest() {
|
||||||
@@ -90,19 +90,11 @@ public class TLWMatchdaysCreatorTest {
|
|||||||
System.out.println(sql);
|
System.out.println(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void getMatchdaysRelegationSqlTest() {
|
|
||||||
|
|
||||||
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 47, "Relegation");
|
|
||||||
String sql = matchdaysCreator.getMatchdaysSQL();
|
|
||||||
System.out.println(sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getMatchdaysEMTippspielSqlTest() {
|
public void getMatchdaysEMTippspielSqlTest() {
|
||||||
|
|
||||||
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 49, "EM-Tippspiel");
|
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 49, "EM-Tippspiel");
|
||||||
String sql = matchdaysCreator.getMatchdaysSQL();
|
String sql = matchdaysCreator.getMatchdaysSQL();
|
||||||
System.out.println(sql);
|
// System.out.println(sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
package de.jeyp91.tippliga;
|
package de.jeyp91.tippliga;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
public class TLWMatchesCreatorFootballTest {
|
public class TLWMatchesCreatorFootballTest {
|
||||||
|
|
||||||
int season = 2027;
|
int season = 2026;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getMatchesTest() {
|
public void getMatchesTest() {
|
||||||
@@ -48,9 +49,9 @@ public class TLWMatchesCreatorFootballTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getMatchesRelegationSqlTest() {
|
public void getMatchesEMTippspielSqlTest() {
|
||||||
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(season, 47, "Relegation");
|
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 49, "EM-Tippspiel");
|
||||||
String sql = creator.getSQLInsertString();
|
String sql = creator.getSQLInsertString();
|
||||||
System.out.println(sql);
|
// System.out.println(sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import org.junit.Test;
|
|||||||
|
|
||||||
public class TLWMatchesCreatorTipperPokalTest {
|
public class TLWMatchesCreatorTipperPokalTest {
|
||||||
|
|
||||||
int season = 2027;
|
int season = 2026;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getMatchesWTLPokalTest() {
|
public void getMatchesWTLPokalTest() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import org.junit.Test;
|
|||||||
|
|
||||||
public class TLWMatchesCreatorTipperTest {
|
public class TLWMatchesCreatorTipperTest {
|
||||||
|
|
||||||
int season = 2027;
|
int season = 2026;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getMatchesTippliga1Test() {
|
public void getMatchesTippliga1Test() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import org.junit.Test;
|
|||||||
|
|
||||||
public class TLWMatchesUpdaterFootballTest {
|
public class TLWMatchesUpdaterFootballTest {
|
||||||
|
|
||||||
int season = 2027;
|
int season = 2026;
|
||||||
@Test
|
@Test
|
||||||
public void getUpdateSqlTest1() {
|
public void getUpdateSqlTest1() {
|
||||||
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, 1, "Tippliga");
|
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, 1, "Tippliga");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.junit.Test;
|
|||||||
|
|
||||||
public class TLWTeamsCreatorTest {
|
public class TLWTeamsCreatorTest {
|
||||||
|
|
||||||
int season = 2027;
|
int season = 2026;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getTeamsTippligaFootball1Test() {
|
public void getTeamsTippligaFootball1Test() {
|
||||||
|
|||||||
Reference in new issue
Block a user