Created
February 11, 2020 20:41
-
-
Save pliablepixels/c30bef6704008c3230faefbdb11e4be8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyzm.api as zmapi | |
api_options = { | |
'apiurl': 'https://yourserver/zm/api', | |
'portalurl': 'https://yourserver/zm', | |
'user': 'admin', | |
'password': 'password', | |
'logger': None # use none if you don't want to log to ZM | |
} | |
zmapi = zmapi.ZMApi(options=api_options) | |
event_filter = { | |
'from': '1 day ago', # this will use localtimezone, use 'tz' for other timezones | |
'object_only':True, | |
} | |
events = zmapi.events(event_filter) | |
for e in events.list(): | |
print ('Monitor:{} Event:{} Notes:{} Detected Frame URL:{}'.format(e.monitor_id(),e.id(),e.notes(), e.get_image_url(fid='objdetect'))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment