diff --git a/src/Rossedman/Teamwork/Tasklist.php b/src/Rossedman/Teamwork/Tasklist.php index f44091a..01ae0f5 100644 --- a/src/Rossedman/Teamwork/Tasklist.php +++ b/src/Rossedman/Teamwork/Tasklist.php @@ -55,4 +55,26 @@ public function timeTotal() return $this->client->get("tasklists/$this->id/time/total")->response(); } + /** + * All tasks on task list + * + * GET /tasklists/{id}/tasks.json + * + * @return mixed + */ + public function tasks($args = null) + { + return $this->client->get("$this->endpoint/$this->id/tasks")->response($args); + } + + /** + * Create task in tasklist + * POST /tasklists/{id}/tasks.json + * + * @return mixed + */ + public function createTask($args) + { + return $this->client->post("$this->endpoint/$this->id/tasks", ['todo-item' => $args])->response(); + } }