Updating dev-1.0.

This commit is contained in:
Alano Terblanche
2019-09-15 22:29:42 +02:00
parent 475c72b241
commit c4600134b5
3 changed files with 8 additions and 7 deletions

View File

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