YACWC
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user