Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Task API Move Task to different list

I'd like to know if the Google Tasks API provides the option to move a task to a different list or if I need to create a copy of the task.

The move method seems to only allow moving within the same list.

like image 273
Dan Schien Avatar asked May 17 '14 03:05

Dan Schien


2 Answers

The tasks API does not support moving tasks from one list to another, just changing a tasks parent task or moving it to the top of the list.

You can however get the task with /lists/tasklist_id/tasks/task_id, check each of its fields and set populate the same fields with a different tasklist_id using /lists/new_tasklist_id/tasks and then delete the old one with /lists/tasklist_id/tasks/task_id

Google also provides the Tasks API explorer which should help you experiment.

like image 140
Thai Wood Avatar answered Nov 07 '22 23:11

Thai Wood


Just to confirm the answer by Thai Wood:

This is definitely the way to do it. I also moved a task using the website and and noticed that the task id changes, therefore the google website also seems to do a delete followed by a insert.

like image 30
Peter C Avatar answered Nov 07 '22 23:11

Peter C