============================ Streaming Event API ============================ In this initial version we have added `slt_stream` API which works on `pg_notify`. if any user has added shift comment, shift annotation, shift comment reply or started or ended the shift all the other user will be notified in real time using this API. There are six possible output of this API Shift Started / Created ------------------------ .. code-block:: python data: {"action" : "shift_created", "data": ""} Shift Ended / Stopped --------------------- .. code-block:: python data: {"action" : "shift_ended", "data": ""} Shift Annotation ----------------- .. code-block:: python data: {"action" : "annotation_created", "data": ""} Shift Comment Version History ------------------------------ .. code-block:: python data: {"action" : "comment_updated", "data": ""} Shift Comment Create / Update -------------------------------------- .. code-block:: python data: {"action" : "comment_created", "data": ""} Shift Comment Reply -------------------------------------- .. code-block:: python data: {"action" : "reply_added", "data": ""} Shift Comment Logs -------------------------------------- .. code-block:: python data: {"action" : "logs_added", "data": ""} .. note:: **Sending this heartbeat every 30 sec for keeping the connection alive on browser (in 45 sec browser closes the connection if no data received)** .. code-block:: python data: {"type": "heartbeat"}