changed URL params for /events call

full_example
mcotton 2023-06-02 08:11:19 -05:00
parent 0a63657305
commit 78e2541ca1
1 changed files with 2 additions and 2 deletions

View File

@ -486,7 +486,7 @@ class Camera(Device):
"data": { 'msg': 'get_list_of_events called without required args, needs start_timestamp, end_timestamp' } "data": { 'msg': 'get_list_of_events called without required args, needs start_timestamp, end_timestamp' }
} }
url = f"https://{self.user_base_url}/api/v3.0/events?pageSize=100&include=data.een.deviceCloudStatusUpdate.v1&startTimestamp__gte={start_timestamp}&endTimestamp__lte={end_timestamp}&actor=camera%3A{self.id}" url = f"https://{self.user_base_url}/api/v3.0/events?pageSize=100&include=een.deviceCloudStatusUpdate.v1&startTimestamp__gte={start_timestamp}&endTimestamp__lte={end_timestamp}&actor=camera%3A{self.id}&type__in=een.deviceCloudStatusUpdateEvent.v1"
headers = { headers = {
"Authorization": f"Bearer {self.een_instance.access_token}", "Authorization": f"Bearer {self.een_instance.access_token}",
@ -496,7 +496,7 @@ class Camera(Device):
response = requests.get(url, headers=headers) response = requests.get(url, headers=headers)
response_json = response.json() response_json = response.json()
logging.debug(f"{response.status_code} returned from {url} with {headers}") logging.debug(f"{response.status_code} returned from {url} with {headers} and {response.text}")
logging.info(f"{response.status_code} in get_list_of_events") logging.info(f"{response.status_code} in get_list_of_events")
if response.status_code == 200: if response.status_code == 200: