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

Commit

Permalink
Remove unneeded project_id parameter from item_complete.
Browse files Browse the repository at this point in the history
  • Loading branch information
lefcha committed Jan 14, 2016
1 parent fc42def commit ad3db13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def test_item(api_token):
assert response['Items'][0]['is_deleted'] == 1
assert 'UpdatedItem1' not in [p['content'] for p in api.state['Items']]

api.items.complete(item2['project_id'], [item2['id']])
api.items.complete([item2['id']])
api.commit()
response = api.items.sync()
assert response['Items'][0]['content'] == 'Item2'
Expand Down
3 changes: 1 addition & 2 deletions todoist/managers/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def close(self, item_id):
}
self.queue.append(cmd)

def complete(self, project_id, item_ids, force_history=0):
def complete(self, item_ids, force_history=0):
"""
Marks items as completed remotely, by appending the equivalent request to the
queue.
Expand All @@ -93,7 +93,6 @@ def complete(self, project_id, item_ids, force_history=0):
'type': 'item_complete',
'uuid': self.api.generate_uuid(),
'args': {
'project_id': project_id,
'ids': item_ids,
'force_history': force_history,
},
Expand Down
3 changes: 1 addition & 2 deletions todoist/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ def complete(self, force_history=0):
Marks item as completed, and appends the equivalent request to the
queue.
"""
self.api.items.complete(self['project_id'], [self['id']],
force_history)
self.api.items.complete([self['id']], force_history)
self.data['checked'] = 1
self.data['in_history'] = force_history

Expand Down

0 comments on commit ad3db13

Please sign in to comment.