Sugar Network/API: Difference between revisions

No edit summary
No edit summary
Line 27: Line 27:
* The ''AUTH-TOKEN'' is the {{Code|uid}} which is a hashed value from Sugar profile public SSH key (the same as JID value in Sugar Shell but without the domain part) that does not require any handshake procedures.
* The ''AUTH-TOKEN'' is the {{Code|uid}} which is a hashed value from Sugar profile public SSH key (the same as JID value in Sugar Shell but without the domain part) that does not require any handshake procedures.


== Common actions ==
=== Common properties ===
 
All resources have the following properties:
 
* {{Code|ctime}}, ''int''<br>the UNIX seconds in UTC timezone of the time when object was created; optional, will be set on a server side otherwise;
* {{Code|mtime}}, ''int''<br>the UNIX seconds in UTC timezone of the time when object was modified; optional, will be set on a server side otherwise;
* {{Code|creator}}, ''guid'', ''read''<br>the ''player'' who created the object.
 
=== Common actions ===


Actions might be restricted for particular resource, see the corresponding section for detailed information.
Actions might be restricted for particular resource, see the corresponding section for detailed information.
Line 36: Line 44:


Sends:
Sends:
:* {{Code|ctime}}, ''int''<br>the UNIX seconds in UTC timezone of the time when object was created; optional, will be set on a server side otherwise;
: Resource properties.
:* {{Code|mtime}}, ''int''<br>the UNIX seconds in UTC timezone of the time when object was modified; optional, will be set on a server side otherwise;


Receives:
Receives:
Line 108: Line 115:
: {{Code|type: update}}
: {{Code|type: update}}


== Common events ==
=== Common events ===


All events have the following common properties:
All events have the following common properties: