diff --git a/README.md b/README.md index 513b361..c8e4d39 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,15 @@ const realTimeAPI = new RealTimeAPI("wss://demo.rocket.chat/websocket"); realTimeAPI.keepAlive(); // Responds "pong" to the "ping" message sent by the Realtime API. To keep the connection alive. +const auth = realTimeApi.login(USERNAME, PASSWORD); +// Creating Observable + +//Now subscribing the observable + + auth.subscribe( + (data) => console.log(data), + (err) => console.log(err), + () => console.log('completed')); ... ...