diff --git a/example.py b/example.py index 04b42ce..efc2e22 100644 --- a/example.py +++ b/example.py @@ -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__': diff --git a/wideq.py b/wideq.py index 422f94f..2d9a8c1 100644 --- a/wideq.py +++ b/wideq.py @@ -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']