RESTService » History » Version 6

« Previous - Version 6/8 (diff) - Next » - Current version
Philipp Gerling, 08/27/2014 10:27 AM


RESTService

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

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/
}

watchdata/

Contains a JSON Object of the whole data we have.

@[{
"name":"printer name",
"type": "RED" or "YELLOW",
"claimed": boolean,
"messages": [LIST OF MESSAGES]
"states": [LIST OF: {"state":STATE_TYPE, "duration":DURATION_IN_SECONDS}]
}, {
...
}]
@