summaryrefslogtreecommitdiff
path: root/internal/api/google_tasks.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/google_tasks.go')
-rw-r--r--internal/api/google_tasks.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/api/google_tasks.go b/internal/api/google_tasks.go
index da3cd3b..b580be4 100644
--- a/internal/api/google_tasks.go
+++ b/internal/api/google_tasks.go
@@ -163,6 +163,18 @@ func (c *GoogleTasksClient) CompleteTask(ctx context.Context, listID, taskID str
return nil
}
+// UpdateTaskNotes updates a task's notes (description)
+func (c *GoogleTasksClient) UpdateTaskNotes(ctx context.Context, listID, taskID, notes string) error {
+ task := &tasks.Task{
+ Notes: notes,
+ }
+ _, err := c.srv.Tasks.Patch(listID, taskID, task).Context(ctx).Do()
+ if err != nil {
+ return fmt.Errorf("failed to update task notes: %v", err)
+ }
+ return nil
+}
+
// UncompleteTask marks a task as not completed
func (c *GoogleTasksClient) UncompleteTask(ctx context.Context, listID, taskID string) error {
task := &tasks.Task{