public static function createUrl(string $appId, string $cluster = null): string
    {
        $query = [
            'client' => 'api-clients/pusher (https://php-api-clients.org/clients/pusher)',
            'protocol' => 7,
            'version' => ApiSettings::getVersion(),
        ];

        $host = ($cluster !== null) ? "ws-{$cluster}.pusher.com" : 'ws.pusherapp.com';

        return 'wss://'.$host.'/app/' .
            $appId .
            '?' . http_build_query($query)
        ;
    }