Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "id": "1e003033",
- "name": "camera",
- "last_app": null,
- "last_ip_address": "192.168.0.27",
- "last_heard": "2016-08-27T14:22:49.762Z",
- "product_id": 6,
- "connected": true,
- "platform_id": 6,
- "cellular": false,
- "status": "normal",
- "pinned_build_target": "0.5.2",
- "variables": {
- "lonlat": "string",
- "speedmph": "string",
- "sats": "string"
- },
- "functions": []
- }
- requestURL_O = "https://api.spark.io/v1/devices/" + deviceID + "/?access_token=" + accessToken;
- $.getJSON(requestURL_O, function(jonline){
- console.log(jonline.connected);
- jstr = jonline.connect;
- console.log(jstr);
- if (jstr == "true"){
- online_status = true;
- console.log("equal = TRUE");
- }
- else {
- online_status = false;
- jstr = jonline.last_heard;
- console.log(jonline.last_heard);
- console.log("equal = FALSE");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement