Cleanup code and prepare for AI usage
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user