ForumsDevelopersError while setting completed date


Error while setting completed date
Author Message
japf

Posted: Jan 29, 2012
Score: -1 Reference
Hi there,

I'm having an issue while trying to update the completed date of a task. I'm sending the following request:

http://api.toodledo.com/2/tasks/edit.php?key=KEY;tasks=[{"id":0123456,"completed":1327870587}];field s=completed;f=xml

The response from the server is:

{"errorCode":3,"errorDesc":"id,title,modified,completed do not need to be specified"}

Any help ?

Thanks !
Jeremy
safire

Posted: Jan 29, 2012
Score: 1 Reference
You need to drop "completed" from the list of fields that you are updating. In your case that means your list of fields is empty. See http://api.toodledo.com/2/tasks/index.php, look for the description for "fields":

Always returned (do not list in the fields paramater):
id, title, modified, completed

As a request to the Toodledo folks, this really need not be an error....
Jake

Toodledo Founder
Posted: Jan 30, 2012
Score: 0 Reference
True, it is more of a warning than an error, but we don't have a method for sending warnings back to the requester. We figured that a developer would get this error once, and then look it up and fix their code so it would never happen again. We disallow these fields in the request to save bandwidth. I know that 10 bytes may not seem like much, but when you multiple it by the millions of API calls we get per day, it really adds up on our end, which is why we are aggressive about sending and requesting the minimum amount of data necessary.
japf

Posted: Jan 30, 2012
Score: -1 Reference
Thanks for the feedback it was my mistake. I was able to fix the code.

I'm working on a WP7 app btw, where I'll have ToodleDo & Exchange support with a very nice and fluid UI... I'll might need some testers at some points :-)
safire

Posted: Jan 30, 2012
Score: 1 Reference
Posted by Toodledo:
True, it is more of a warning than an error, but we don't have a method for sending warnings back to the requester. We figured that a developer would get this error once, and then look it up and fix their code so it would never happen again. We disallow these fields in the request to save bandwidth. I know that 10 bytes may not seem like much, but when you multiple it by the millions of API calls we get per day, it really adds up on our end, which is why we are aggressive about sending and requesting the minimum amount of data necessary.


Yep -- makes sense. One suggestion, change the message slightly to:

{"errorCode":3,"errorDesc":"id,title,modified,completed do not need to be specified *in the fields parameter*"}

I know I hit exactly the same problem when writing my API, and took me a bit to figure out what exactly the problem was.
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.