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 --- internal/config/config.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/config') diff --git a/internal/config/config.go b/internal/config/config.go index cf3af49..2d77025 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -19,6 +19,9 @@ type Config struct { GoogleCredentialsFile string GoogleCalendarID string + // Google Tasks + GoogleTasksListID string + // Paths DatabasePath string MigrationDir string @@ -48,6 +51,9 @@ func Load() (*Config, error) { GoogleCredentialsFile: os.Getenv("GOOGLE_CREDENTIALS_FILE"), GoogleCalendarID: getEnvWithDefault("GOOGLE_CALENDAR_ID", "primary"), + // Google Tasks + GoogleTasksListID: getEnvWithDefault("GOOGLE_TASKS_LIST_ID", "@default"), + // Paths DatabasePath: getEnvWithDefault("DATABASE_PATH", "./dashboard.db"), MigrationDir: getEnvWithDefault("MIGRATION_DIR", "migrations"), @@ -109,6 +115,11 @@ func (c *Config) HasGoogleCalendar() bool { return c.GoogleCredentialsFile != "" } +// HasGoogleTasks checks if Google Tasks is configured +func (c *Config) HasGoogleTasks() bool { + return c.GoogleCredentialsFile != "" && c.GoogleTasksListID != "" +} + // getEnvWithDefault returns environment variable value or default if not set func getEnvWithDefault(key, defaultValue string) string { if value := os.Getenv(key); value != "" { -- cgit v1.2.3