I am playing around with the GPS application on my Spark Core.
If I use the following URL in Chrome browser (Access token and ID are dummy ones)
https://api.spark.io/v1/devices/53af72066678505545451467/events?access_token=e3273ffe51b907473c4b488962dd2c2d18f19ff3
Only when the event is published by the Spark Core, the browser window updates with the following. I was hoping the API would just give me the last time the variable gpsloc was last updated.
:ok
event: gpsloc
data: {"data":"-42.909233,147.419235","ttl":"60","published_at":"2015-02-08T04:34:40.741Z","coreid":"53af72066678505545451467"}
I want to retrieve the variable gpsloc using curl, but it will not work?? I assume I would just use the following command
curl https://api.spark.io/v1/devices/53af72066678505545451467/gpsloc?access_token=e3273ffe51b907473c4b488962dd2c2d18f19ff3
But I just get the following error
{
"ok": false,
"error": "Variable not found"
}
Any help appreciated.
Kind regards
Stephen