diff --git a/src/Asana/Client.php b/src/Asana/Client.php index da7d9a2..6aed3f7 100644 --- a/src/Asana/Client.php +++ b/src/Asana/Client.php @@ -72,6 +72,7 @@ public function __construct($dispatcher, $options = array()) $this->teammemberships = new Resources\TeamMemberships($this); $this->teams = new Resources\Teams($this); $this->timeperiods = new Resources\TimePeriods($this); + $this->timetrackingentries = new Resources\TimeTrackingEntries($this); $this->typeahead = new Resources\Typeahead($this); $this->users = new Resources\Users($this); $this->usertasklists = new Resources\UserTaskLists($this); diff --git a/src/Asana/Resources/Gen/TasksBase.php b/src/Asana/Resources/Gen/TasksBase.php index 3c6a823..8ded81c 100644 --- a/src/Asana/Resources/Gen/TasksBase.php +++ b/src/Asana/Resources/Gen/TasksBase.php @@ -241,7 +241,22 @@ public function getTasksForUserTaskList($user_task_list_gid, $params = array(), $path = str_replace("{user_task_list_gid}", $user_task_list_gid, $path); return $this->client->getCollection($path, $params, $options); } - + + + /** Get time tracking entries for a task + * + * @param string $task_gid (required) Globally unique identifier for the task. + * @param array $params + * @param array $options + * @return response + */ + public function getTimeTrackingEntriesForTask($task_gid, $params = array(), $options = array()) + { + $path = "/tasks/{task_gid}/time_tracking_entries"; + $path = str_replace("{task_gid}", $task_gid, $path); + return $this->client->getCollection($path, $params, $options); + } + /** Unlink dependencies from a task * * @param string $task_gid (required) The task to operate on. diff --git a/src/Asana/Resources/Gen/TimeTrackingEntriesBase.php b/src/Asana/Resources/Gen/TimeTrackingEntriesBase.php new file mode 100644 index 0000000..65c1bc8 --- /dev/null +++ b/src/Asana/Resources/Gen/TimeTrackingEntriesBase.php @@ -0,0 +1,28 @@ +client = $client; + } + + /** Returns the full record for a single time-tracking entry. + * + * @param string $time_tracking_entry_gid (required) Globally unique identifier for the time-tracking entry. + * @param array $params + * @param array $options + * @return response + */ + public function getTimeTrackingEntry($time_tracking_entry_gid, $params = array(), $options = array()) + { + $path = "/time_tracking_entries/{time_tracking_entry_gid}"; + $path = str_replace("{time_tracking_entry_gid}", $time_tracking_entry_gid, $path); + return $this->client->get($path, $params, $options); + } +} diff --git a/src/Asana/Resources/TimeTrackingEntries.php b/src/Asana/Resources/TimeTrackingEntries.php new file mode 100644 index 0000000..88e7cf9 --- /dev/null +++ b/src/Asana/Resources/TimeTrackingEntries.php @@ -0,0 +1,9 @@ +