lib/todoist/sync/items.rb in todoist-ruby-0.2.6 vs lib/todoist/sync/items.rb in todoist-ruby-0.2.7
- old
+ new
@@ -16,13 +16,12 @@
# Update item given a hash of attributes
def update(args)
return @client.api_helper.command(args, "item_update")
end
- # Delete items given an array of items
- def delete(items)
- item_ids = items.collect { |item| item.id }
- args = {ids: item_ids.to_json}
+ # Delete an item given an item id
+ def delete(item_id)
+ args = {id: item_id}
return @client.api_helper.command(args, "item_delete")
end
# Move an item from one project to another project given an item and a project.
# Note that move requires a fully inflated item object because it uses