Fab1en / rocket-chat-rest-client

Rocket Chat REST API client in PHP
49 stars 38 forks source link

Real Time? #7

Open Naguchennai opened 7 years ago

Naguchennai commented 7 years ago

This will give real time api?

Lawri-van-Buel commented 7 years ago

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 ;)

Fab1en commented 7 years ago

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.