ForumsDevelopersonfor attribute in api docs not mentioned

onfor attribute in api docs not mentioned
Author Message

Posted: Jun 01, 2008
Score: 0 Reference
I'm seeing this when I'm getting a task back:

<timer onfor="123">600</timer>

But there's no mention of the 'onfor' attribute in the docs. And the timer parameter is only mentioned in the 'edit task' context, not adding or getting.

Toodledo Admin
Posted: Jun 02, 2008
Score: 1 Reference
If the timer is currently on, the "onfor" value will be a unix timestamp indicating when the timer was last started. The timer value (600 in your example) indicates the number of seconds that the timer has counted prior to the most recent start. So, to get the running total you need to add the two. Like:

Total elapsed time so far = timer+(now-onfor)

Thanks for pointing this out. We will update the documentation to make this more clear.
You cannot reply yet

U Back to topic home

R Post a reply

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