This repository has been archived by the owner on Feb 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
199 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
175 changes: 175 additions & 0 deletions
175
tests/cassettes/tests.commands.test_sensor.test_live.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
{ | ||
"http_interactions": [ | ||
{ | ||
"recorded_at": "2016-09-19T23:23:30", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "{\"data\": {\"type\": \"sensor\", \"attributes\": {\"name\": \"test\"}}}" | ||
}, | ||
"headers": { | ||
"Accept": "application/json", | ||
"Accept-Charset": "utf-8", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Authorization": "<AUTH_TOKEN>", | ||
"Connection": "keep-alive", | ||
"Content-Length": "60", | ||
"Content-Type": "application/json", | ||
"User-Agent": "helium-python/0.1.0" | ||
}, | ||
"method": "POST", | ||
"uri": "https://api.helium.com/v1/sensor" | ||
}, | ||
"response": { | ||
"body": { | ||
"base64_string": "H4sIAAAAAAAEA5WQQW7EIAxF7+J1qAghdMg5ZtXRLBziqpEIicBZVKPcvaZt2mVVCcnY8P9/8IAJGWF4ADLnedyZSu0SLgQDSMdwNJApIs9rKm/z9nm+EOOpPOs8icJZ7foetbLeGWUv4aLGgL1qg59evTHGdx00wO9b9f+xOSSEIi2UuMZ/WaY9RplHHCn+Tm/3evk/YTWl6gNmQayuDSwYzm3IhEwV3ujWKe1V66+mG2R1+sl5+9zaF2GOWFgVonQKtzWz/Mbt3sC+CfKfHsL9/fBCqawZjuMD+4qeyYEBAAA=", | ||
"encoding": null, | ||
"string": "" | ||
}, | ||
"headers": { | ||
"Access-Control-Allow-Headers": "Origin, Content-Type, Accept, Authorization", | ||
"Access-Control-Allow-Origin": "*", | ||
"Airship-Quip": "javascript doesn't have integers", | ||
"Airship-Trace": "b13,b12,b11,b10,b09,b08,b07,b06,b05,b04,b03,c03,c04,d04,e05,e06,f06,f07,g07,g08,h10,i12,l13,m16,n16,n11,p11", | ||
"Content-Encoding": "gzip", | ||
"Content-Type": "application/json", | ||
"Date": "Mon, 19 Sep 2016 23:23:30 GMT", | ||
"Location": "/v1/sensor/640655a0-4962-48c8-bca5-1c9df9222933", | ||
"Server": "Warp/3.2.7", | ||
"Transfer-Encoding": "chunked" | ||
}, | ||
"status": { | ||
"code": 201, | ||
"message": "Created" | ||
}, | ||
"url": "https://api.helium.com/v1/sensor" | ||
} | ||
}, | ||
{ | ||
"recorded_at": "2016-09-19T23:23:30", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "" | ||
}, | ||
"headers": { | ||
"Accept": "application/json", | ||
"Accept-Charset": "utf-8", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Authorization": "<AUTH_TOKEN>", | ||
"Connection": "keep-alive", | ||
"Content-Type": "application/json", | ||
"User-Agent": "helium-python/0.1.0" | ||
}, | ||
"method": "GET", | ||
"uri": "https://api.helium.com/v1/sensor" | ||
}, | ||
"response": { | ||
"body": { | ||
"base64_string": "H4sIAAAAAAAEA6VYXYsbNxT9K2Ze2kI03KtvzVs/CLRQWprtS0sokkYiSzfeYDsN7dL/3iM79q7H442dsp7FGI2ke3TuuefqoRvjJnbD7w9d3GxWt+n9pqy74aFbxrelG7of4yp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i8iwIBSDIpt9CKnZiGvAs/UseDQYiU/vycExzYMXBG+VseHnevg848xMupb+dlnvsdKj8u2xvFu1HeN5RvqafXuyG2musm8ngPLiy/vl4qPbHcv6z68OCMcUlaNUhFcOFSVpFgm8FNbbRGTD6N1pDu9K8xl6atdK0DSPdyTZxiRtr+B3zZZ0E2uHTDxGmJ0jmtBzW1H+F8IaBrzVN6UGMqhawWu4qc/I9lc/QzoOYOognQlI81gTCT1aK2COYXYAJY+SsvTncl3Ol2fe1vMZMGHxkL7AE82D1MpuLd4pmPtc16hDsg9OqV0hP/QQj/ycN4M4EAgrVjOtm6DQo3DqJqwXg9UEH4O3nRUXtFbZAJtkK/xyriJmnQV0PTmV0GAE1bLjss4q5lYDp+B40QoqoYGAfelhLWFFJ7m8q0F7DF6fNlDTOQzba/zv05BzGtEeVSNMDtD/pI0IlZ1wlZIfEbenFsWlIaO/fD5k2UsVQpg2B1eF3ObwoTmWi0+5+4D+9k1ZCU9G2kNGtJbZKBkFTL4T2o9GRF2KqL5Ip4KOKp8a1t1et63R7uv0iMFI045YaqRAb11guxXhOf5Lf0OwVgqtYi+ZIdhHct1U+awQz69zPSZBB20OmCRWxcCuo1WJKGohwzYVZUSmwLUoLdFPP8eIT2DSrGRvNaNpm9C+XT0gn514igk5O/FJl0FytMznQMLGP0KiUnJjTsJ7mEjN2oogKQoXC6H7iFzpWV04Cwm8I1QebbPsCYXpTBNzjAhLReZalrQLGggyGm50QApvXw7J18vFr7sLnMWr/cXMTi4d2pGi0N/lkr3QVFCcVUUpHeHZKqOe2FP788ns8QKdL26HCM2d7sk5J6eleDfHswL5dA6IrAzXCGSHe7jN4fQh0daYiKoQLG5RPGJNOeIaIocR9lnKoD7j9A8+AgSASATteNo5fDLM+TlOj/b1v/8BvRZPJGsUAAA=", | ||
"encoding": null, | ||
"string": "" | ||
}, | ||
"headers": { | ||
"Access-Control-Allow-Headers": "Origin, Content-Type, Accept, Authorization", | ||
"Access-Control-Allow-Origin": "*", | ||
"Airship-Quip": "WARNING: ulimit -n is 1024", | ||
"Airship-Trace": "b13,b12,b11,b10,b09,b08,b07,b06,b05,b04,b03,c03,c04,d04,e05,e06,f06,f07,g07,g08,h10,i12,l13,m16,n16,o16,o17,o18", | ||
"Content-Encoding": "gzip", | ||
"Content-Type": "application/json", | ||
"Date": "Mon, 19 Sep 2016 23:23:30 GMT", | ||
"Server": "Warp/3.2.7", | ||
"Transfer-Encoding": "chunked" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://api.helium.com/v1/sensor" | ||
} | ||
}, | ||
{ | ||
"recorded_at": "2016-09-19T23:23:30", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "" | ||
}, | ||
"headers": { | ||
"Accept": "text/event-stream", | ||
"Accept-Charset": "utf-8", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Authorization": "<AUTH_TOKEN>", | ||
"Connection": "keep-alive", | ||
"Content-Type": "application/json", | ||
"User-Agent": "helium-python/0.1.0" | ||
}, | ||
"method": "GET", | ||
"uri": "https://api.helium.com/v1/sensor/640655a0-4962-48c8-bca5-1c9df9222933/timeseries/live" | ||
}, | ||
"response": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "event: sensor\ndata: {\"data\":{\"attributes\":{\"value\":42,\"timestamp\":\"2016-09-18T23:57:49.477274Z\",\"port\":\"test_post\"},\"relationships\":{\"sensor\":{\"data\":{\"id\":\"_\",\"type\":\"sensor\"}}},\"id\":\"8646ef8b-6458-4267-90ce-849e78fb38c9\",\"meta\":{\"created\":\"2016-09-18T23:57:49.704603Z\"},\"type\":\"data-point\"}}\n\n\n\nevent: sensor\ndata: {\"data\":{\"attributes\":{\"value\":43,\"timestamp\":\"2016-09-18T23:57:59.245238Z\",\"port\":\"test_post\"},\"relationships\":{\"sensor\":{\"data\":{\"id\":\"_\",\"type\":\"sensor\"}}},\"id\":\"8ff950ee-4749-41b8-85a2-9b030a52637c\",\"meta\":{\"created\":\"2016-09-18T23:57:59.251219Z\"},\"type\":\"data-point\"}}\n\n" | ||
}, | ||
"headers": { | ||
"Access-Control-Allow-Headers": "Origin, Content-Type, Accept, Authorization", | ||
"Access-Control-Allow-Origin": "*", | ||
"Airship-Quip": "javascript doesn't have integers", | ||
"Airship-Trace": "b13,b12,b11,b10,b09,b08,b07,b06,b05,b04,b03,c03,c04,d04,e05,e06,f06,f07,g07,g08,h10,i12,l13,m16,n16,o16,o17,o18", | ||
"Content-Encoding": "utf-8", | ||
"Content-Type": "text/event-stream", | ||
"Date": "Mon, 19 Sep 2016 23:23:30 GMT", | ||
"Server": "Warp/3.2.7", | ||
"Transfer-Encoding": "chunked" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://api.helium.com/v1/sensor/640655a0-4962-48c8-bca5-1c9df9222933/timeseries/live" | ||
} | ||
}, | ||
{ | ||
"recorded_at": "2016-09-19T23:23:31", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "" | ||
}, | ||
"headers": { | ||
"Accept": "application/json", | ||
"Accept-Charset": "utf-8", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Authorization": "<AUTH_TOKEN>", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"Content-Type": "application/json", | ||
"User-Agent": "helium-python/0.1.0" | ||
}, | ||
"method": "DELETE", | ||
"uri": "https://api.helium.com/v1/sensor/640655a0-4962-48c8-bca5-1c9df9222933" | ||
}, | ||
"response": { | ||
"body": { | ||
"encoding": null, | ||
"string": "" | ||
}, | ||
"headers": { | ||
"Access-Control-Allow-Headers": "Origin, Content-Type, Accept, Authorization", | ||
"Access-Control-Allow-Origin": "*", | ||
"Airship-Quip": "firm pat on the back", | ||
"Airship-Trace": "b13,b12,b11,b10,b09,b08,b07,b06,b05,b04,b03,c03,c04,d04,e05,e06,f06,f07,g07,g08,h10,i12,l13,m16,m20,o20", | ||
"Date": "Mon, 19 Sep 2016 23:23:30 GMT", | ||
"Server": "Warp/3.2.7" | ||
}, | ||
"status": { | ||
"code": 204, | ||
"message": "No Content" | ||
}, | ||
"url": "https://api.helium.com/v1/sensor/640655a0-4962-48c8-bca5-1c9df9222933" | ||
} | ||
} | ||
], | ||
"recorded_with": "betamax/0.8.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters