Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
Initial v7 API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikdoof committed Aug 4, 2016
1 parent 7a24f83 commit 52ad1ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 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'])
api.sync()

# Check the next action label exists
labels = api.labels.all(lambda x: x['name'] == args.label)
Expand All @@ -80,7 +80,7 @@ def main():
def get_project_type(project_object):
"""Identifies how a project should be handled."""
name = project_object['name'].strip()
if project['name'] == 'Inbox':
if name == 'Inbox':
return args.inbox
elif name[-1] == args.parallel_suffix:
return 'parallel'
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'])
api.sync()
except Exception as e:
logging.exception('Error trying to sync with Todoist API: %s' % str(e))
else:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
todoist-python==0.2.26
todoist-python>=7.0.10,<8.0.0

0 comments on commit 52ad1ea

Please sign in to comment.