public function followChannel($userIdentifier, $channelIdentifier, $accessToken, $notifications = false)
    {
        if ($this->apiVersionIsGreaterThanV3()) {
            if (!is_numeric($userIdentifier)) {
                throw new InvalidIdentifierException('user');
            }

            if (!is_numeric($channelIdentifier)) {
                throw new InvalidIdentifierException('channel');
            }
        }

        if (!is_bool($notifications)) {
            throw new InvalidTypeException('Notifications', 'boolean', gettype($notifications));
        }

        return $this->put(
            sprintf('users/%s/follows/channels/%s', $userIdentifier, $channelIdentifier),
            ['notifications' => $notifications],
            $accessToken
        );
    }
public function followChannel($userIdentifier, $channelIdentifier, $accessToken, $notifications = false)
    {
        if ($this->apiVersionIsGreaterThanV3()) {
            if (!is_numeric($userIdentifier)) {
                throw new InvalidIdentifierException('user');
            }

            if (!is_numeric($channelIdentifier)) {
                throw new InvalidIdentifierException('channel');
            }
        }

        if (!is_bool($notifications)) {
            throw new InvalidTypeException('Notifications', 'boolean', gettype($notifications));
        }

        return $this->put(
            sprintf('users/%s/follows/channels/%s', $userIdentifier, $channelIdentifier),
            ['notifications' => $notifications],
            $accessToken
        );
    }
public function followChannel ( $ userIdentifier , $ channelIdentifier , $ accessToken , $ notifications = false ) { if ( $ this -> apiVersionIsGreaterThanV3 ( ) ) { if ( ! is_numeric ( $ userIdentifier ) ) { throw new InvalidIdentifierException ( 'user' ) ; } if ( ! is_numeric ( $ channelIdentifier ) ) { throw new InvalidIdentifierException ( 'channel' ) ; } } if ( ! is_bool ( $ notifications ) ) { throw new InvalidTypeException ( 'Notifications' , 'boolean' , gettype ( $ notifications ) ) ; } return $ this -> put ( sprintf ( 'users/%s/follows/channels/%s' , $ userIdentifier , $ channelIdentifier ) , [ 'notifications' => $ notifications ] , $ accessToken ) ; }
Have a user follow a channel

@param string|int $userIdentifier
@param string|int $channelIdentifier
@param string     $accessToken
@param bool       $notifications
@throws InvalidIdentifierException
@throws InvalidTypeException
@return array|json
Have a user follow a channel