php - Getting a ratio of completed tasks to total tasks in Asana -
i'm creating panel panic's statusboard show projects workspace, ratio of completed tasks total tasks.
i can currently, based on i'm seeing in api docs, problem need make 40 requests info need , number larger more tasks added selected projects.
i'm looping through each selected project , getting each individual task, i'm taking task object in 'completed' property.
is there way each project completed counts , total counts properties?
or, there approach take don't timeout errors when making many requests..
you should able getting of tasks project , selecting completed field using ?opt_fields=completed option on request.
e.g., http://app.asana.com/api/1.0/projects/[project]/tasks?opt_fields=completed
where [project] project id you're querying. return completed status of tasks within given project. iterate on returned tasks , count completed/uncompleted statuses.
note opt_fields option, identified fields returned.
Comments
Post a Comment