Skip to content

Example of the output of examples printAPI.go

Larry Rosenman edited this page Feb 3, 2018 · 3 revisions
$ printAPI
DeviceResponse:
HTTPResponseCode: 200, ResponseTime: 653.684788ms
Device Record:
[
	{
		"Macaddress": "98:84:E3:4A:AC:DB",
		"Info": {
			"Name": "Test Station",
			"Location": "WS-8478"
		},
		"LastData": {
			"Date": "2018-02-03T23:35:00Z",
			"Baromabsin": 28.64,
			"Baromrelin": 29.73,
			"Battout": "1",
			"Batt1": "1",
			"Batt2": "1",
			"Batt3": "1",
			"Batt4": "1",
			"Batt5": "1",
			"Batt6": "1",
			"Batt7": "1",
			"Batt8": "",
			"Batt9": "",
			"Batt10": "",
			"Co2": 0,
			"Dailyrainin": 0,
			"Dewpoint": 30.807917507834457,
			"Eventrainin": 0,
			"Feelslike": 79.23604857030004,
			"Hourlyrainin": 0,
			"Humidity": 16,
			"Humidity1": 23,
			"Humidity2": 55,
			"Humidity3": 12,
			"Humidity4": 23,
			"Humidity5": 27,
			"Humidity6": 25,
			"Humidity7": 28,
			"Humidity8": 0,
			"Humidity9": 0,
			"Humidity10": 0,
			"Humidityin": 0,
			"LastRain": "0001-01-01T00:00:00Z",
			"Maxdailygust": 3.1,
			"Relay1": 0,
			"Relay2": 0,
			"Relay3": 0,
			"Relay4": 0,
			"Relay5": 0,
			"Relay6": 0,
			"Relay7": 0,
			"Relay8": 0,
			"Relay9": 0,
			"Relay10": 0,
			"Monthlyrainin": 0,
			"Solarradiation": 0,
			"Tempf": 81.3,
			"Temp1f": 74.6,
			"Temp2f": 1.9,
			"Temp3f": 43.8,
			"Temp4f": 73,
			"Temp5f": 67.6,
			"Temp6f": 74.4,
			"Temp7f": 70.3,
			"Temp8f": 0,
			"Temp9f": 0,
			"Temp10f": 0,
			"Tempinf": 0,
			"Totalrainin": "",
			"Uv": 0.2,
			"Weeklyrainin": 0,
			"Winddir": 279,
			"Windgustmph": 0,
			"Windgustdir": 0,
			"Windspeedmph": 0,
			"Winddir_avg2m": 0,
			"Windspdmph_avg2m": 0,
			"Winddir_avg10m": 0,
			"Windspdmph_avg10m": 0,
			"Yearlyrainin": 0
		},
		"LastDataFields": {
			"baromabsin": 28.64,
			"baromrelin": 29.73,
			"batt1": "1",
			"batt2": "1",
			"batt3": "1",
			"batt4": "1",
			"batt5": "1",
			"batt6": "1",
			"batt7": "1",
			"battout": "1",
			"dailyrainin": 0,
			"date": "2018-02-03T23:35:00.000Z",
			"dateutc": 1517700900000,
			"dewPoint": 30.807917507834457,
			"feelsLike": 79.23604857030004,
			"hourlyrainin": 0,
			"humidity": 16,
			"humidity1": 23,
			"humidity2": 55,
			"humidity3": 12,
			"humidity4": 23,
			"humidity5": 27,
			"humidity6": 25,
			"humidity7": 28,
			"maxdailygust": 3.1,
			"temp1f": 74.6,
			"temp2f": 1.9,
			"temp3f": 43.8,
			"temp4f": 73,
			"temp5f": 67.6,
			"temp6f": 74.4,
			"temp7f": 70.3,
			"tempf": 81.3,
			"uv": 0.2,
			"winddir": 279,
			"windgustmph": 0,
			"windspeedmph": 0
		}
	}
]
JSONResponse:
[
	{
		"macAddress": "98:84:E3:4A:AC:DB",
		"lastData": {
			"dateutc": 1517700900000,
			"baromrelin": 29.73,
			"baromabsin": 28.64,
			"winddir": 279,
			"windspeedmph": 0,
			"windgustmph": 0,
			"maxdailygust": 3.1,
			"hourlyrainin": 0,
			"dailyrainin": 0,
			"uv": 0.2,
			"tempf": 81.3,
			"humidity": 16,
			"battout": "1",
			"temp1f": 74.6,
			"humidity1": 23,
			"batt1": "1",
			"temp2f": 1.9,
			"humidity2": 55,
			"batt2": "1",
			"temp3f": 43.8,
			"humidity3": 12,
			"batt3": "1",
			"temp4f": 73,
			"humidity4": 23,
			"batt4": "1",
			"temp5f": 67.6,
			"humidity5": 27,
			"batt5": "1",
			"temp6f": 74.4,
			"humidity6": 25,
			"batt6": "1",
			"temp7f": 70.3,
			"humidity7": 28,
			"batt7": "1",
			"feelsLike": 79.23604857030004,
			"dewPoint": 30.807917507834457,
			"date": "2018-02-03T23:35:00.000Z"
		},
		"info": {
			"name": "Test Station",
			"location": "WS-8478"
		}
	}
]

DeviceMacResponse[Test Station(98:84:E3:4A:AC:DB)]:
HTTPResponseCode: 200, ResponseTime: 391.109272ms
Record:
[
	{
		"Date": "2018-02-03T23:30:00Z",
		"Baromabsin": 28.64,
		"Baromrelin": 29.73,
		"Battout": "1",
		"Batt1": "1",
		"Batt2": "1",
		"Batt3": "1",
		"Batt4": "1",
		"Batt5": "1",
		"Batt6": "1",
		"Batt7": "1",
		"Batt8": "",
		"Batt9": "",
		"Batt10": "",
		"Co2": 0,
		"Dailyrainin": 0,
		"Dewpoint": 25.987137146297353,
		"Eventrainin": 0,
		"Feelslike": 79.35190309679999,
		"Hourlyrainin": 0,
		"Humidity": 13,
		"Humidity1": 23,
		"Humidity2": 53,
		"Humidity3": 12,
		"Humidity4": 23,
		"Humidity5": 27,
		"Humidity6": 25,
		"Humidity7": 28,
		"Humidity8": 0,
		"Humidity9": 0,
		"Humidity10": 0,
		"Humidityin": 0,
		"LastRain": "0001-01-01T00:00:00Z",
		"Maxdailygust": 3.1,
		"Relay1": 0,
		"Relay2": 0,
		"Relay3": 0,
		"Relay4": 0,
		"Relay5": 0,
		"Relay6": 0,
		"Relay7": 0,
		"Relay8": 0,
		"Relay9": 0,
		"Relay10": 0,
		"Monthlyrainin": 0,
		"Solarradiation": 0,
		"Tempf": 81.6,
		"Temp1f": 74.6,
		"Temp2f": 0.3,
		"Temp3f": 43.3,
		"Temp4f": 73.2,
		"Temp5f": 67.4,
		"Temp6f": 74.6,
		"Temp7f": 70.1,
		"Temp8f": 0,
		"Temp9f": 0,
		"Temp10f": 0,
		"Tempinf": 0,
		"Totalrainin": "",
		"Uv": 0.5,
		"Weeklyrainin": 0,
		"Winddir": 267,
		"Windgustmph": 0,
		"Windgustdir": 0,
		"Windspeedmph": 0,
		"Winddir_avg2m": 0,
		"Windspdmph_avg2m": 0,
		"Winddir_avg10m": 0,
		"Windspdmph_avg10m": 0,
		"Yearlyrainin": 0
	}
]
RecordFields:
[
	{
		"baromabsin": 28.64,
		"baromrelin": 29.73,
		"batt1": "1",
		"batt2": "1",
		"batt3": "1",
		"batt4": "1",
		"batt5": "1",
		"batt6": "1",
		"batt7": "1",
		"battout": "1",
		"dailyrainin": 0,
		"date": "2018-02-03T23:30:00.000Z",
		"dateutc": 1517700600000,
		"dewPoint": 25.987137146297353,
		"feelsLike": 79.35190309679999,
		"hourlyrainin": 0,
		"humidity": 13,
		"humidity1": 23,
		"humidity2": 53,
		"humidity3": 12,
		"humidity4": 23,
		"humidity5": 27,
		"humidity6": 25,
		"humidity7": 28,
		"maxdailygust": 3.1,
		"temp1f": 74.6,
		"temp2f": 0.3,
		"temp3f": 43.3,
		"temp4f": 73.2,
		"temp5f": 67.4,
		"temp6f": 74.6,
		"temp7f": 70.1,
		"tempf": 81.6,
		"uv": 0.5,
		"winddir": 267,
		"windgustmph": 0,
		"windspeedmph": 0
	}
]
JSONResponse:
[
	{
		"dateutc": 1517700600000,
		"baromrelin": 29.73,
		"baromabsin": 28.64,
		"winddir": 267,
		"windspeedmph": 0,
		"windgustmph": 0,
		"maxdailygust": 3.1,
		"hourlyrainin": 0,
		"dailyrainin": 0,
		"uv": 0.5,
		"tempf": 81.6,
		"humidity": 13,
		"battout": "1",
		"temp1f": 74.6,
		"humidity1": 23,
		"batt1": "1",
		"temp2f": 0.3,
		"humidity2": 53,
		"batt2": "1",
		"temp3f": 43.3,
		"humidity3": 12,
		"batt3": "1",
		"temp4f": 73.2,
		"humidity4": 23,
		"batt4": "1",
		"temp5f": 67.4,
		"humidity5": 27,
		"batt5": "1",
		"temp6f": 74.6,
		"humidity6": 25,
		"batt6": "1",
		"temp7f": 70.1,
		"humidity7": 28,
		"batt7": "1",
		"feelsLike": 79.35190309679999,
		"dewPoint": 25.987137146297353,
		"date": "2018-02-03T23:30:00.000Z"
	}
]

$
Clone this wiki locally