ForumsDevelopersImproved examples in Documentation please
Improved examples in Documentation please
Thanks for the recent updates to the documentation - we've actually have been able to solve many problems looking at the new examples you posted. Many thanks.
One more request please (especially for 'old timers' using API 1.0). Many things and fields have changed in API 2.0. Another example is that of 'duedate'. This used to be a timestamp of the format '2011-01-01' and this worked in API 1.0. Passing this now sets the date to 1970 Jan 01 in Toodledo.
Looking at the docuemntation it seems to say it takes in a 'unix timestamp' but then the link posted in the next line (http://www.toodledo.com/info/help.php?sel=5) says it can take in any string like 'tomorrow', 'today' etc but this isn't the case.
Can you please kindly add 'examples' of values against each fields which isn't that obvious or you believe it's input requirements have changed since API 1.0. We've been experimenting with different values until we find something that works which seems a bit counter productive.
Many thanks again for the updated docs.
I should add: the problem with the new duedate is that if you send it a GMT unix timestamp (such as for 27th May 2011 12:00 noon) it always shows the due date in toodledo as:
27th May at 11:23 pm
I dont know where it's getting that '11:23 pm' from. I am assuming this has something to do with timezone/DST or something else to do with server time offset during the conversion from supplied date to server date/time. This is why we need concrete examples on how Toodledo expects us to send the values for duedate and duetime.
Duetime is also a little confusing. If due date is set it needs a date attached to the timestamp in GMT. But how does the server deal with DST? In my knowledge it's not as simple to convert 'local' time to a unix 'GMT' timestamp where DST is involved unless we know very clearly what the server is going to do with the timestamp.
Please kindly elaborate on this with some examples so we're able to do the conversion for toodledo correctly. Many thanks.
GMT does not have DST, so if you specify all dates/times as GMT you only need to convert the unix timestamp to a human readable date/time at display time. At this point, you will need to apply the timezone and DST, but most SDKs will handle this for you so you won't have to worry about DST or timezones.
I just tried using the API to set a duedate with a GMT timestamp of (May 19, 11:10am) and when I looked on the website, I saw "May 19th" without a time, which is the expected value. Then I added another task with the same timestamp in the duetime field as well as the duedate field, and on Toodledo I saw "May 19th 11:10am", which is correct. So, I wasn't able to reproduce the problems that you are having. Maybe you aren't setting both the due-date and due-time fields?
Here is sample PHP code for making a task with a due-date and time:
$url = "http://api.toodledo.com/2/tasks/add.php";
$task['title'] = 'I am due on April 20 at 4pm';
$task['duedate'] = 1305907200;
$task['duetime'] = 1305907200;
$json = json_encode($task);
$encoded = urlencode($json);
$params = "key=".$key."&tasks=".$encoded;
$response = curlPOST($url,$params);
$added = json_decode($response);
This message was edited May 20, 2011.
You cannot reply yet
U Back to topic home
R Post a reply
To participate in these forums, you must be signed in.