From f0a7366f3112e6a603ef00f1872d5be78f363d83 Mon Sep 17 00:00:00 2001 From: Mark Cotton Date: Tue, 8 Aug 2023 08:39:48 -0600 Subject: [PATCH] APIv3 /events query limit raised from 6 to 24 hours --- app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 8a92129..d054688 100644 --- a/app.py +++ b/app.py @@ -191,10 +191,10 @@ def camera_detail(esn=None, days=DAYS_OF_HISTORY): camera = een.get_camera_by_id(esn) now = een.time_now() - # because of API limitation, can only query 6 hours max - for i in tqdm(range(0, days * 4)): - camera.get_list_of_events(end_timestamp=een.time_before(ts=now, hours=6*i), \ - start_timestamp=een.time_before(ts=now, hours=6*(i+1))) + # because of API limitation, can only query 24 hours max + for i in tqdm(range(0, days)): + camera.get_list_of_events(end_timestamp=een.time_before(ts=now, hours=24*i), \ + start_timestamp=een.time_before(ts=now, hours=24*(i+1))) values = { "current_user": een.current_user,