Skip to content

Commit

Permalink
Added Create Time Entry
Browse files Browse the repository at this point in the history
POST /tasks/{id}/time_entries.json
  • Loading branch information
Mat-Gr authored Sep 13, 2017
1 parent 20437b6 commit 832cbb8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/Rossedman/Teamwork/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ public function timeTotal()
return $this->client->get("$this->endpoint/$this->id/time/total")->response();
}

/**
* Create Time Entry
* POST /tasks/{id}/time_entries.json
*
* @param $data
*
* @return mixed
*/
public function createTime($data)
{
return $this->client->post("$this->endpoint/$this->id/time_entries", ['time-entry' => $data])->response();
}

/**
* Edit A Task
* PUT tasks/{id}.json
Expand All @@ -69,4 +82,4 @@ public function edit($args)
{
return $this->client->put("$this->endpoint/$this->id.json", ['todo-item' => $args])->response();
}
}
}

0 comments on commit 832cbb8

Please sign in to comment.