APIv3 /events query limit raised from 6 to 24 hours

main
Mark Cotton 2023-08-08 08:39:48 -06:00
parent 3183e109f7
commit f0a7366f31
1 changed files with 4 additions and 4 deletions

8
app.py
View File

@ -191,10 +191,10 @@ def camera_detail(esn=None, days=DAYS_OF_HISTORY):
camera = een.get_camera_by_id(esn) camera = een.get_camera_by_id(esn)
now = een.time_now() now = een.time_now()
# because of API limitation, can only query 6 hours max # because of API limitation, can only query 24 hours max
for i in tqdm(range(0, days * 4)): for i in tqdm(range(0, days)):
camera.get_list_of_events(end_timestamp=een.time_before(ts=now, hours=6*i), \ camera.get_list_of_events(end_timestamp=een.time_before(ts=now, hours=24*i), \
start_timestamp=een.time_before(ts=now, hours=6*(i+1))) start_timestamp=een.time_before(ts=now, hours=24*(i+1)))
values = { values = {
"current_user": een.current_user, "current_user": een.current_user,