public function getUsersFollowedChannels($userIdentifier, $limit = 25, $offset = 0, $direction = 'desc', $sortby = 'created_at')
    {
        $availableSortBys = ['created_at', 'last_broadcast', 'login'];

        if ($this->apiVersionIsGreaterThanV3() && !is_numeric($userIdentifier)) {
            throw new InvalidIdentifierException('user');
        }

        if (!$this->isValidLimit($limit)) {
            throw new InvalidLimitException();
        }

        if (!$this->isValidOffset($offset)) {
            throw new InvalidOffsetException();
        }

        if (!$this->isValidDirection($direction)) {
            throw new InvalidDirectionException();
        }

        if (!in_array($sortby = strtolower($sortby), $availableSortBys)) {
            throw new UnsupportedOptionException('sortby', $availableSortBys);
        }

        return $this->get(sprintf('users/%s/follows/channels', $userIdentifier), [
            'limit' => intval($limit),
            'offset' => intval($offset),
            'direction' => $direction,
            'sortby' => $sortby,
        ]);
    }
public function getUsersFollowedChannels($userIdentifier, $limit = 25, $offset = 0, $direction = 'desc', $sortby = 'created_at')
    {
        $availableSortBys = ['created_at', 'last_broadcast', 'login'];

        if ($this->apiVersionIsGreaterThanV3() && !is_numeric($userIdentifier)) {
            throw new InvalidIdentifierException('user');
        }

        if (!$this->isValidLimit($limit)) {
            throw new InvalidLimitException();
        }

        if (!$this->isValidOffset($offset)) {
            throw new InvalidOffsetException();
        }

        if (!$this->isValidDirection($direction)) {
            throw new InvalidDirectionException();
        }

        if (!in_array($sortby = strtolower($sortby), $availableSortBys)) {
            throw new UnsupportedOptionException('sortby', $availableSortBys);
        }

        return $this->get(sprintf('users/%s/follows/channels', $userIdentifier), [
            'limit' => intval($limit),
            'offset' => intval($offset),
            'direction' => $direction,
            'sortby' => $sortby,
        ]);
    }
public function getUsersFollowedChannels ( $ userIdentifier , $ limit = 25 , $ offset = 0 , $ direction = 'desc' , $ sortby = 'created_at' ) { $ availableSortBys = [ 'created_at' , 'last_broadcast' , 'login' ] ; if ( $ this -> apiVersionIsGreaterThanV3 ( ) && ! is_numeric ( $ userIdentifier ) ) { throw new InvalidIdentifierException ( 'user' ) ; } if ( ! $ this -> isValidLimit ( $ limit ) ) { throw new InvalidLimitException ( ) ; } if ( ! $ this -> isValidOffset ( $ offset ) ) { throw new InvalidOffsetException ( ) ; } if ( ! $ this -> isValidDirection ( $ direction ) ) { throw new InvalidDirectionException ( ) ; } if ( ! in_array ( $ sortby = strtolower ( $ sortby ) , $ availableSortBys ) ) { throw new UnsupportedOptionException ( 'sortby' , $ availableSortBys ) ; } return $ this -> get ( sprintf ( 'users/%s/follows/channels' , $ userIdentifier ) , [ 'limit' => intval ( $ limit ) , 'offset' => intval ( $ offset ) , 'direction' => $ direction , 'sortby' => $ sortby , ] ) ; }
Gets a list of all channels followed by a user

@param string|int $userIdentifier
@param int    $limit
@param int    $offset
@param string $direction
@param string $sortby
@throws InvalidIdentifierException
@throws InvalidLimitException
@throws InvalidOffsetException
@throws UnsupportedOptionException
@return array|json
Gets a list of all channels followed by a user