Update task information's
@link https://www.bugherd.com/api_v2#api_task_update

@param  int $projectId  the project id
@param  int            $id     the issue number
@param  array         $params
@return boolean
541531
public function update($projectId,$id, array $params)
    {
         $data = array('task'=>$params);
       
        return $this->put('/projects/'.urlencode($projectId).'/tasks/'.urlencode($id).'.json', $data);
    }
668817
public function createForTask(string $id, array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::POST,
            ResourceMethodEnum::CREATE_FOR_TASK,
            $params,
            $id
        );
    }
997175
public function edit($id, array $parameters, $createIfNotExists = false)
    {
        $method    = $createIfNotExists ? 'PUT' : 'PATCH';
        $supported = $this->isSupported('edit');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/'.$id.'/edit', $parameters, $method) : $supported;
    }
1309724
public function update($id, array $params = array())
    {
        $this->validateRequiredParameters(array('callbackURL', 'idModel'), $params);

        return $this->put($this->getPath().'/'.rawurlencode($id), $params);
    }
1370789
public function connect($id, array $params)
    {
        if (isset($params['connection'])) {
            $connectionParams = $params['connection'];
        } else {
            $connectionParams = $params;
            $connectionParams['driver'] = str_replace('dbal_', '', $connectionParams['driver']);
        }

        $this->persistentConnect($connectionParams);

        return new common_persistence_SqlPersistence($params, $this);
    }
1137937
public function retryTask($task_id, $delay = 1)
    {
        if (empty($task_id)) {
            throw new \InvalidArgumentException("Please set task_id");
        }
        $url = "projects/{$this->project_id}/tasks/$task_id/retry";
        $request = array('delay' => $delay);

        $this->setCommonHeaders();
        $res = json_decode($this->apiCall(self::POST, $url, $request));
        return $res->tasks[0]->id;
    }
1294595
public function enableProjects($enable, $project_id)
    {
        $enable = $enable === 'true';

        $projects = $project_id == 'all'
            ? Project::all()
            : Project::where('id', $project_id)->get();

        foreach ($projects as $test) {
            $this->enableProject($enable, $test);
        }

        return $enable;
    }
978564
public function getTaskInfo($id, $options=array()){

        $data = array();
        
        $data['id'] = $id;

        $data = array_merge($data, $options);

        return $this->request($this->taskInfoUrl, $data);
    }
1326811
def update_project(id, **kwargs):
    
    content = update_project_raw(id, **kwargs)
    if content:
        return utils.format_json(content)
28794
public function cancelTask($task_id)
    {
        if (empty($task_id)) {
            throw new \InvalidArgumentException("Please set task_id");
        }
        $url = "projects/{$this->project_id}/tasks/$task_id/cancel";
        $request = array();

        $this->setCommonHeaders();
        $res = $this->apiCall(self::POST, $url, $request);
        return self::json_decode($res);
    }
1146563
public function updateTaskErrorMessage($id = null, $errorMessage = null, $keepExistingMessage = false) {
		if (empty($id) || !$this->exists($id) || empty($errorMessage)) {
			return false;
		}

		if ($keepExistingMessage) {
			$this->id = $id;
			$message = $this->field('failure_message');
			if (!empty($message)) {
				$errorMessage = $message . "\n" . $errorMessage;
			}
		}

		return $this->markJobFailed($id, $errorMessage);
	}
888606
public function findByProject($projectId, $params = array(), $options = array())
    {
        $path = sprintf("/projects/%s/tasks", $projectId);
        return $this->client->getCollection($path, $params, $options);
    }
1333554
public function update($id, array $fields = [], $script = null, array $params = [])
    {
        $body = array_filter(
            [
                'doc' => $fields,
                'script' => $script,
            ]
        );

        $params = array_merge(
            [
                'id' => $id,
                'index' => $this->getManager()->getIndexName(),
                'type' => $this->type,
                'body' => $body,
            ],
            $params
        );

        return $this->getManager()->getClient()->update($params);
    }
587985
public function update($id, SiteVerificationWebResourceResource $postBody, $optParams = array()) {
      $params = array('id' => $id, 'postBody' => $postBody);
      $params = array_merge($params, $optParams);
      $data = $this->__call('update', array($params));
      if ($this->useObjects()) {
        return new SiteVerificationWebResourceResource($data);
      } else {
        return $data;
      }
    }
893694
public function updateTaskProgress($id, &$step, $maxStep = 0) {
		if (empty($id) || !$this->exists($id) ||
			($maxStep < 1) || ($maxStep < $step)) {
			return false;
		}

		$step++;
		$progress = $step / $maxStep;

		return $this->updateProgress($id, $progress);
	}
535061
public function getProjectTasks($projectId = null)
    {
        $projectId = $projectId ?: $this->defaultProjectId;

        return $this->curl->get("tasks?project={$projectId}");
    }
438346
public static function updateSource($id, $sourceId, $params = null, $opts = null)
    {
        return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
    }