public function insert(array $data)
    {
        $id = 0;
        if (!empty($data['task_id'])) {
            $id = (int) $data['task_id'];
            $resource = 'todo_items';
        } elseif (!empty($data['project_id'])) {
            $id = (int) $data['project_id'];
            $resource = 'projects';
        }
        if ($id <= 0) {
            throw new Exception('Required field project_id or task_id');
        }
        return $this->rest->post("$resource/$id/$this->action", $data);
    }