Legend

Forum

Unread topics or posts

Topic

Unread posts

Locked

Announcement

Forums > Developers

onfor attribute in api docs not mentioned



AuthorMessage
will.sargent

Posted: Jun 01, 2008
Score: 0



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.
Jake

Toodledo Admin
Posted: Jun 02, 2008
Score: 1



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


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



Toodledo Forums > Developers