I have read the documentation of the Cloud API, but I couldn’t find what the response format of the json returned when doing a GET request to read the value of a variable.
I am writing the Golang bindings for the API, but haven’t yet managed to get hold of a Spark Core. Thus at the moment there is no way of knowing what is the response.
{
"cmd": "VarReturn",
"name": "<<your variable name here>>",
"result": <<your variable value here>>,
"coreInfo": {
"last_app": "",
"last_heard": "2014-07-27T16:45:42.803Z",
"connected": true,
"deviceID": "<<your device id here>>"
}
I edited the parts between the << >> to where your specific values will be. Variables can be strings or integers or double-precision floating-point numbers or booleans.