rocket-chat-rest-client icon indicating copy to clipboard operation
rocket-chat-rest-client copied to clipboard

Real Time?

Open Naguchennai opened this issue 7 years ago • 2 comments

This will give real time api?

Naguchennai avatar Jul 10 '17 12:07 Naguchennai

I assume you mean to ask " does this library support / include the 'Real time API'. the answer is 'not in its current state but you could add it easily.' I suspect @Fab1en will agree with me on this ;)

Lawri-van-Buel avatar Jul 10 '17 14:07 Lawri-van-Buel

Hi @naguchennai

If you mean this https://rocket.chat/docs/developer-guides/realtime-api/ , I fear that it is not as simple as @Lawri-van-Buel says. As far as I understand the documentation, the Real Time API uses websockets, whereas the API provided with this PHP REST client is only via HTTP. And I don't know how to deal with websockets using PHP.

However, if your question simply is "does the code executed by this PHP REST client updates other clients in real time ? " the answer is yes. As soon as a HTTP call is made to the Rocket Chat server, it will be reverberated to all clients via websockets.

Fab1en avatar Jul 10 '17 14:07 Fab1en