This commit is contained in:
2025-06-20 16:33:12 -04:00
parent f15171147b
commit 37b929fcbe
5 changed files with 105 additions and 5 deletions

View File

@@ -2,12 +2,27 @@ from reolinkapi.handlers.api_handler import APIHandler
class Camera(APIHandler):
def __exit__(self):
if self._token is not None:
print('Logging out')
self.logout()
else:
print('not logged in, logging out')
def __del__(self):
if self._token is not None:
print('Logging out')
self.logout()
else:
print('not logged in, logging out')
def __init__(self, ip: str,
username: str = "admin",
password: str = "",
https: bool = False,
defer_login: bool = False,
defer_login: bool = True,
profile: str = "main",
**kwargs):
"""