src/ApiClient.php
public function getChannelByName($name)
    {
        return $this->getChannels()->then(function (array $channels) use ($name) {
            foreach ($channels as $channel) {
                if ($channel->getName() === $name) {
                    return $channel;
                }
            }

            throw new ApiException('Channel ' . $name . ' not found.');
        });
    }
public function getChannelByName($name)
    {
        return $this->getChannels()->then(function (array $channels) use ($name) {
            foreach ($channels as $channel) {
                if ($channel->getName() === $name) {
                    return $channel;
                }
            }

            throw new ApiException('Channel ' . $name . ' not found.');
        });
    }
public function getChannelByName ( $ name ) { return $ this -> getChannels ( ) -> then ( function ( array $ channels ) use ( $ name ) { foreach ( $ channels as $ channel ) { if ( $ channel -> getName ( ) === $ name ) { return $ channel ; } } throw new ApiException ( 'Channel ' . $ name . ' not found.' ) ; } ) ; }
Gets a channel by its name.

@param string $name The name of the channel.

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