Changes

621 bytes added ,  02:36, 20 September 2012
Line 85: Line 85:  
Data to receive:
 
Data to receive:
 
:* property value in JSON notation.
 
:* property value in JSON notation.
 +
 +
== Notifications ==
 +
 +
It is possible to subscribe to server events. Notification will happen using HTML5 [[wikipedia:Server-sent_events|Server-sent events]].
 +
 +
To start subscription, send the following request:
 +
 +
'''GET''' /cmd=subscribe[&only_commits=1]
 +
 +
Where:
 +
* {{Code|only_commits}},<br>subscribers can be notified only with ''commit'' events; that is useful to minimize interactions between server and clients.
 +
 +
Response will be served with ''text/event-stream'' MIME type for default SSE message type. SSE message will be a JSONified object with the following, at least, attributes:
 +
 +
* {{Code|event}}<br>event type.
    
== Getting involved ==
 
== Getting involved ==
    
{{:Sugar_Network/Feedback}}
 
{{:Sugar_Network/Feedback}}