Skip to content
This repository has been archived by the owner on Feb 25, 2018. It is now read-only.

Adapt to latest v7 API of Todoist #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nextaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main():
logging.debug('Connecting to the Todoist API')
api = TodoistAPI(token=args.api_key)
logging.debug('Syncing the current state from the API')
api.sync(resource_types=['projects', 'labels', 'items'])
response = api.sync()

# Check the next action label exists
labels = api.labels.all(lambda x: x['name'] == args.label)
Expand Down Expand Up @@ -112,7 +112,7 @@ def remove_label(item, label):
# Main loop
while True:
try:
api.sync(resource_types=['projects', 'labels', 'items'])
response = api.sync()
except Exception as e:
logging.exception('Error trying to sync with Todoist API: %s' % str(e))
else:
Expand Down