I am using Todoist's Sync API to manage my tasks. I've successfully created tasks and add Due dates. But not able to update or remove due dates from tasks.
I'm using the following:
import todoist
api = todoist.TodoistAPI('xxxx')
api.reset_state
api.sync()
TaskList = api.state['items']
item = api.items.get_by_id('4061696598')
item.update(due=None)
api.commit
api.sync()
print('done')
I've tried:
- due=None
- due=null
- due=""
- due={}
What am i missing?!
You are not actually calling the
commit
method: instead ofapi.commit
, you should useapi.commit()
.(Likewise for
api.reset_state()
by the way.)