Allow API connection over HTTPS

This commit is contained in:
David Beitey
2019-09-15 11:11:21 +10:00
parent 4ebc0a2c97
commit 1f5944801c
3 changed files with 9 additions and 7 deletions

View File

@@ -3,9 +3,10 @@ from APIHandler import APIHandler
class Camera(APIHandler):
def __init__(self, ip, username="admin", password=""):
APIHandler.__init__(self, ip)
def __init__(self, ip, username="admin", password="", https=False):
APIHandler.__init__(self, ip, https=https)
self.ip = ip
self.username = username
self.password = password
self.https = https
super().login(self.username, self.password)