docs: Updated the method keepAlive in docs.

#44
master
Viraj Trivedi 7 years ago
parent 4eb0ce4546
commit 3783ad0cc8

@ -5,10 +5,10 @@
[![npm](https://img.shields.io/npm/v/rocket.chat.realtime.api.rxjs.svg)](https://www.npmjs.com/package/rocket.chat.realtime.api.rxjs)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
Abstraction for Utilizing [Rocket.Chat](https://rocket.chat/)'s [Realtime API](https://rocket.chat/docs/developer-guides/realtime-api) Methods with [RxJS](http://reactivex.io/rxjs/)
## Installation
```
npm install --save rocket.chat.realtime.api.rxjs
```
@ -22,7 +22,7 @@ import { RealTimeAPI } from "rocket.chat.realtime.api.rxjs";
const realTimeAPI = new RealTimeAPI("wss://demo.rocket.chat/websocket");
// Provide, URL to the Rocket.Chat's Realtime API.
realTimeAPI.keepAlive();
realTimeAPI.keepAlive().subscribe();
// Responds "pong" to the "ping" message sent by the Realtime API. To keep the connection alive.
const auth = realTimeApi.login(USERNAME, PASSWORD);
@ -44,9 +44,9 @@ const auth = realTimeApi.login(USERNAME, PASSWORD);
## Methods
| Methods | Functionality |
|------------------------------------------------------------ |----------------------------------------------------------------------------------------------- |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| connectToServer() | Initiates Connections to the Server to the RealTime API. Returns Observable with the server's response |
| keepAlive() | Responds "pong" to the "ping" message sent by the Realtime API. To keep the connection alive. |
| keepAlive() | Returns Observable to subscribe which Responds "pong" to the "ping" message sent by the Realtime API. To keep the connection alive. |
| login(username, password) | Returns Observable to the Result/Response from the RealTime API. |
| loginWithAuthToken(authToken) | Returns Observable to the Result/Response from the RealTime API. |
| loginWithOAuth(credToken, credSecret) | Returns Observable to the Result/Response from the RealTime API. |
@ -60,5 +60,4 @@ const auth = realTimeApi.login(USERNAME, PASSWORD);
| disconnect() | Disconnect the WebSocket Connection between client and RealTime API |
| | |
### Checkout the Rocket.Chat's [RealTime API documentation](https://rocket.chat/docs/developer-guides/realtime-api) for further information on working of the RealTime API.

Loading…
Cancel
Save