ZoneMinder / pyzm

Python API, Log, Event Server and Memory wrapper for ZoneMinder
GNU General Public License v2.0
31 stars 20 forks source link

Add support for Event.delete() #19

Closed mludvig closed 3 years ago

mludvig commented 3 years ago

Fix for #18

It needed a little change in api._make_request() because the DELETE doesn't return json which trips up the r.json() function.

pliablepixels commented 3 years ago

Thanks for the PR. We will also have to fix https://github.com/pliablepixels/pyzm/blob/01e4f8bb92e816b9a089c3830738b46aa8d2d2ef/pyzm/helpers/Events.py to make sure it doesn't show up in the events list

mludvig commented 3 years ago

When I do Event.delete() and then run Events.get() again the deleted one doesn't show up in the list. Or did you mean something else?

pliablepixels commented 3 years ago

Yes I mean the count and list methods without calling get again.

pliablepixels commented 3 years ago

Hmm it is more painful than I thought as Events and Event don't really have a direct connection.