Merge branch 'master' into dev-1.0

This commit is contained in:
Alano Terblanche
2019-09-15 22:35:58 +02:00
committed by GitHub
3 changed files with 6 additions and 3 deletions

View File

@@ -32,7 +32,6 @@ class APIHandler:
:param proxy: Add a proxy dict for requests to consume. :param proxy: Add a proxy dict for requests to consume.
eg: {"http":"socks5://[username]:[password]@[host]:[port], "https": ...} eg: {"http":"socks5://[username]:[password]@[host]:[port], "https": ...}
More information on proxies in requests: https://stackoverflow.com/a/15661226/9313679 More information on proxies in requests: https://stackoverflow.com/a/15661226/9313679
""" """
scheme = 'https' if https else 'http' scheme = 'https' if https else 'http'
self.url = f"{scheme}://{ip}/cgi-bin/api.cgi" self.url = f"{scheme}://{ip}/cgi-bin/api.cgi"

View File

@@ -17,6 +17,10 @@ You can get the Restful API calls by looking through the HTTP Requests made the
Implement a "Camera" object by passing it an IP address, Username and Password. By instantiating the object, it will try retrieve a login token from the Reolink Camera. This token is necessary to interact with the Camera using other commands. Implement a "Camera" object by passing it an IP address, Username and Password. By instantiating the object, it will try retrieve a login token from the Reolink Camera. This token is necessary to interact with the Camera using other commands.
### Styling and Standards
This project intends to stick with [PEP8](https://www.python.org/dev/peps/pep-0008/)
### API Requests Implementation Plan: ### API Requests Implementation Plan:
GET: GET:
@@ -47,7 +51,7 @@ GET:
- [ ] Focus - [ ] Focus
- [ ] Image (Brightness, Contrass, Saturation, Hue, Sharp, Mirror, Rotate) - [ ] Image (Brightness, Contrass, Saturation, Hue, Sharp, Mirror, Rotate)
- [ ] Advanced Image (Anti-flicker, Exposure, White Balance, DayNight, Backlight, LED light, 3D-NR) - [ ] Advanced Image (Anti-flicker, Exposure, White Balance, DayNight, Backlight, LED light, 3D-NR)
- [ ] Image Data - [ ] Image Data -> "Snap" Frame from Video Stream
SET: SET:
- [ ] Display -> OSD - [ ] Display -> OSD

View File

@@ -44,7 +44,7 @@ class Request:
""" """
try: try:
data = requests.get(url=url, verify=False, params=params, timeout=timeout, proxies=Request.proxies) data = requests.get(url=url, verify=False, params=params, timeout=timeout, proxies=Request.proxies)
return data return data
except Exception as e: except Exception as e:
print("Get Error\n", e) print("Get Error\n", e)