1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-16 07:10:09 -07:00

Pull out the list of device data

This commit is contained in:
Adrian Sampson 2018-01-06 14:30:17 -08:00
parent 705b353718
commit fc0a7943b5
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ def example():
# Request a list of devices.
devices = wideq.get_devices(api_root, access_token, session_id)
print(devices)
print_devices(devices)
if __name__ == '__main__':

View File

@ -91,4 +91,4 @@ def get_devices(api_root, access_token, session_id):
'Accept': 'application/json',
}
res = requests.post(url, json=req_data, headers=headers)
return res.json()[DATA_ROOT]
return res.json()[DATA_ROOT]['item']