RESTService » History » Version 4

Version 3 (Philipp Gerling, 08/26/2014 11:39 PM) → Version 4/8 (Philipp Gerling, 08/26/2014 11:40 PM)

h1. RESTService

The REST Service is used as a central data access point.
Two URLs are used:
watchstatus/
watchdata/

h2. watchstatus/

This service contains a md5 hash of the whole JSON Dataset we use. Its used to figure out if the smartphone has to download the data again.

@1. Pull hash
2. if (known md5 == new md5) {
do nothing - you have the up-to-date data
}
else {
pull new data from watchthisdata/
}
@

h2. watchdata/

Contains a JSON Object of the whole data we have.

@makethiswork@
@[{
"name":"printer name",
"type": "RED" or "YELLOW",
"claimed": false or "USER-NAME",
"message": "Message to be displayed. More details. eg. summary of all error messages"
"timeleft": 0seconds - time left, till error gets worse (eg. yellow->red, paper out, ink out...)
},
{
...
}]@
@@