Skip to content

Commit

Permalink
Merge pull request #22 from bslinger/add-remove-followers-from-tasks
Browse files Browse the repository at this point in the history
Add API calls for adding and removing followers from tasks
  • Loading branch information
Torann authored Feb 9, 2022
2 parents 32d915a + d060a19 commit f672210
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/Asana.php
Original file line number Diff line number Diff line change
Expand Up @@ -770,4 +770,30 @@ public function deleteWebhook($webhookId)
{
return $this->curl->delete("webhooks/{$webhookId}");
}

/**
* addFollowersToTask
*
* @param $taskId
* @param $followerIds
*
* @return string|null
*/
public function addFollowersFromTask($taskId, $followerIds)
{
return $this->curl->post("tasks/$taskId/addFollowers", ["data" => ["followers" => $followerIds]]);
}

/**
* removeFollowersFromTask
*
* @param $taskId
* @param $followerIds
*
* @return string|null
*/
public function removeFollowersFromTask($taskId, $followerIds)
{
return $this->curl->post("tasks/$taskId/removeFollowers", ["data" => ["followers" => $followerIds]]);
}
}

0 comments on commit f672210

Please sign in to comment.