cannot delete tasks or notebooks #3

Closed
fgtham opened this Issue Dec 17, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@fgtham

fgtham commented Dec 17, 2011

When trying to delete tasks or notebooks, apiclient.py fails to assemble the correct API calls. This patch fixes the issue for me:

diff --git a/apiclient.py b/apiclient.py
index 6df234f..4ecc2bd 100755
--- a/apiclient.py
+++ b/apiclient.py
@@ -595,7 +595,7 @@ class ApiClient(object):
         '''
         id_ = self.getNotebook(label).id
         self._notebooks_cache = None
-        return self._call(key=key, kind='notebooks', action='delete', id_=id_).text
+        return self._call(key=key, kind='notebooks', action='delete', notebooks=[id_]).text

     @check_api_key
     def editNotebook(self, label, key=None, **kwargs):
@@ -674,7 +674,7 @@ class ApiClient(object):
         '''
         id_ = self.getTask(label).id
         self._tasks_cache = None
-        return self._call(key=key, kind='tasks', action='delete', id_=id_).text
+        return self._call(key=key, kind='tasks', action='delete', tasks=[id_]).text

     @check_api_key
     def editTask(self, label, key=None, **kwargs):
@handyman5

This comment has been minimized.

Show comment Hide comment
@handyman5

handyman5 Jan 1, 2012

Owner

This is fixed with a545125. Thanks so much for the bug report and the patch!

Owner

handyman5 commented Jan 1, 2012

This is fixed with a545125. Thanks so much for the bug report and the patch!

@handyman5 handyman5 closed this Jan 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment