Greetings FreeAgent,
I am attempting to develop a Desktop application that handles the ability
for me to start and stop, create and remove current running timers with
quick ease in the Task bar.
I started a basic application to see if the timeslips API endpoint yields
enough data, but unfortunately I find there happens to not be enough data
in the timeslips endpoint to understand if a timer is currently running or
not. A simple addition would be two columns in the timeslips response.
{ “timeslip”:
{
“url”:“https://api.freeagent.com/v2/timeslips/25”,
“start_timeslip”: “https://api.freeagent.com/v2/timeslips/25/start”, // <-- new addition
“stop_timeslip”: “https://api.freeagent.com/v2/timeslips/25/stop”, // <-- new addition
“project”:“https://api.freeagent.com/v2/projects/1”,
“task”:“https://api.freeagent.com/v2/tasks/1”,
“billed_on_invoice” : “https://api.freeagent.com/v2/invoices/7”,
“dated_on”:“2011-08-15”,
“hours”:“12.0”,
“status”: “running”, // <-- new addition.
“last_state_changed_at”: “2011-08-16T13:38:00Z”, // <-- new addition
“updated_at”:“2011-08-16T13:32:00Z”,
“created_at”:“2011-08-16T13:32:00Z”
}
}
Given the new fields, we should be able to determined and calculate the
current running timer.
I also feel there should be a endpoint to POST
to to start/stop a
timeslip, examples that would be most simplest.
POST https://api.freeagent.com/v2/timeslips/:id/start
POST https://api.freeagent.com/v2/timeslips/:id/stop
I would add a PR myself if I could.