src/ApiClient.php
public function getGroupByName($name)
    {
        return $this->getGroups()->then(function (array $groups) use ($name) {
            foreach ($groups as $group) {
                if ($group->getName() === $name) {
                    return $group;
                }
            }

            throw new ApiException('Group ' . $name . ' not found.');
        });
    }
public function getGroupByName($name)
    {
        return $this->getGroups()->then(function (array $groups) use ($name) {
            foreach ($groups as $group) {
                if ($group->getName() === $name) {
                    return $group;
                }
            }

            throw new ApiException('Group ' . $name . ' not found.');
        });
    }
public function getGroupByName ( $ name ) { return $ this -> getGroups ( ) -> then ( function ( array $ groups ) use ( $ name ) { foreach ( $ groups as $ group ) { if ( $ group -> getName ( ) === $ name ) { return $ group ; } } throw new ApiException ( 'Group ' . $ name . ' not found.' ) ; } ) ; }
Gets a group by its name.

@param string $name The name of the group.

@return \React\Promise\PromiseInterface
Gets a group by its name .