Complete second logic pass, remove underscore from package name

This commit is contained in:
Bobrock
2020-12-18 15:58:01 -06:00
parent 7283bd3cab
commit 0a4898411b
19 changed files with 22 additions and 23 deletions

24
reolinkapi/camera.py Normal file
View File

@@ -0,0 +1,24 @@
from .api_handler import APIHandler
class Camera(APIHandler):
def __init__(self, ip: str, username: str = "admin", password: str = "", https: bool = False):
"""
Initialise the Camera object by passing the ip address.
The default details {"username":"admin", "password":""} will be used if nothing passed
:param ip:
:param username:
:param password:
"""
# For when you need to connect to a camera behind a proxy, pass
# a proxy argument: proxy={"http": "socks5://127.0.0.1:8000"}
APIHandler.__init__(self, ip, username, password, https=https)
# Normal call without proxy:
# APIHandler.__init__(self, ip, username, password)
self.ip = ip
self.username = username
self.password = password
super().login()