for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Helix\Asana;
use Helix\Asana\Base\AbstractEntity;
/**
* A team.
*
* @see https://developers.asana.com/docs/asana-teams
* @see https://developers.asana.com/docs/team
* @immutable Teams cannot be altered via the API.
* @method string getDescription ()
* @method string getHtmlDescription ()
* @method string getName ()
* @method Workspace getOrganization ()
*/
class Team extends AbstractEntity {
const TYPE = 'team';
protected static $map = [
'organization' => Workspace::class
];
final public function __toString (): string {
return "teams/{$this->getGid()}";
}
* @param User $user
* @return $this
public function addUser (User $user) {
$this->api->post("{$this}/addUser", ['user' => $user->getGid()]);
return $this;
public function getUrl (): string {
return "https://app.asana.com/0/{$this->getGid()}/overview";
* @return User[]
public function getUsers () {
return $this->loadAll(User::class, "{$this}/users");
public function removeUser (User $user) {
$this->api->post("{$this}/removeUser", ['user' => $user->getGid()]);