From a3156a2f399ea03c645ee23b0099d9d722ce7e1e Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 26 Jan 2026 20:55:50 -1000 Subject: Add Google Tasks integration (#43) - New GoogleTasksClient for fetching and managing Google Tasks - Tasks appear in Timeline view with yellow indicator dot - Tap checkbox to complete/uncomplete tasks via Google API - Shares credentials file with Google Calendar (GOOGLE_CREDENTIALS_FILE) - Configure task list via GOOGLE_TASKS_LIST_ID env var (default: @default) - Supports comma-separated list IDs for multiple lists New files: - internal/api/google_tasks.go - Google Tasks API client Co-Authored-By: Claude Opus 4.5 --- cmd/dashboard/main.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'cmd/dashboard/main.go') diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index a02ece4..920ccf2 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -106,8 +106,21 @@ func main() { } } - // Initia lize handlers - h := handlers.New(db, todoistClient, trelloClient, planToEatClient, googleCalendarClient, cfg) + var googleTasksClient api.GoogleTasksAPI + if cfg.HasGoogleTasks() { + initCtx, cancel := context.WithTimeout(context.Background(), config.GoogleCalendarInitTimeout) + var err error + googleTasksClient, err = api.NewGoogleTasksClient(initCtx, cfg.GoogleCredentialsFile, cfg.GoogleTasksListID, cfg.Timezone) + cancel() + if err != nil { + log.Printf("Warning: failed to initialize Google Tasks client: %v", err) + } else { + log.Printf("Google Tasks client initialized for list: %s", cfg.GoogleTasksListID) + } + } + + // Initialize handlers + h := handlers.New(db, todoistClient, trelloClient, planToEatClient, googleCalendarClient, googleTasksClient, cfg) // Set up router r := chi.NewRouter() -- cgit v1.2.3