2020-09-29 21:30:48 -07:00
|
|
|
#!/usr/bin/env python3
|
2018-10-09 10:35:01 -07:00
|
|
|
import sys, json
|
|
|
|
|
|
|
|
data=json.load(sys.stdin)
|
2019-10-21 17:00:17 -07:00
|
|
|
|
|
|
|
if 'results' in data:
|
|
|
|
for result in data['results']:
|
2019-10-23 10:04:15 -07:00
|
|
|
if 'series' in result:
|
2020-09-29 21:30:48 -07:00
|
|
|
print(result['series'][0]['columns'][1].encode() + ': ' + str(result['series'][0]['values'][0][1]))
|
2019-10-23 21:05:05 -07:00
|
|
|
else:
|
2020-09-29 21:30:48 -07:00
|
|
|
print("An expected result from CURL request is missing")
|
2019-10-21 17:00:17 -07:00
|
|
|
else:
|
2020-09-29 21:30:48 -07:00
|
|
|
print("No results returned from CURL request")
|