Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ced64de65 | ||
|
|
b41460c569 | ||
|
|
9ff02de48b | ||
|
|
14cbbacc1b | ||
|
|
1cadf3488d | ||
|
|
c78f411014 | ||
|
|
ab2db14bc8 | ||
|
|
37350da1b2 | ||
|
|
19b7eef123 | ||
|
|
6bd8d14190 | ||
|
|
f6ddfbe5cf | ||
|
|
1b66eddfb4 |
@@ -14,3 +14,4 @@ build/*
|
||||
docs/_build
|
||||
*.log
|
||||
venv
|
||||
.session*
|
||||
|
||||
+23
@@ -4,6 +4,29 @@ Changelog
|
||||
|
||||
A list of changes between each release
|
||||
|
||||
0.17.0 (2021-02-15)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**Bugfixes:**
|
||||
- Fix video downloading bug (`#424 <https://github.com/fronzbot/blinkpy/pull/424>`__)
|
||||
- Fix repeated authorization email bug (`#432 <https://github.com/fronzbot/blinkpy/pull/432>`__ and `#428 <https://github.com/fronzbot/blinkpy/pull/428>`__)
|
||||
|
||||
**New Features:**
|
||||
- Add logout method (`#429 <https://github.com/fronzbot/blinkpy/pull/429>`__)
|
||||
- Add camera record method (`#430 <https://github.com/fronzbot/blinkpy/pull/430>`__)
|
||||
|
||||
**Other:**
|
||||
- Add debug script to main repo to help with general debug
|
||||
- Upgrade login endpoint from v4 to v5
|
||||
- Add python 3.9 support
|
||||
- Bump coverage to 5.4
|
||||
- Bump pytest to 6.2.2
|
||||
- Bump pytest-cov to 2.11.1
|
||||
- Bump pygments to 2.8.0
|
||||
- Bump pre-commit to 2.10.1
|
||||
- Bump restructuredtext-lint to 1.3.2
|
||||
|
||||
|
||||
0.16.4 (2020-11-22)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ def request_login(
|
||||
"unique_id": login_data["uid"],
|
||||
"device_identifier": login_data["device_id"],
|
||||
"client_name": "Computer",
|
||||
"reauth": True,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
|
||||
MAJOR_VERSION = 0
|
||||
MINOR_VERSION = 17
|
||||
PATCH_VERSION = "0.rc0"
|
||||
PATCH_VERSION = 0
|
||||
|
||||
__version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}.{PATCH_VERSION}"
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
"""Login testing script."""
|
||||
import sys
|
||||
import os
|
||||
from blinkpy.blinkpy import Blink
|
||||
from blinkpy.auth import Auth
|
||||
from blinkpy.helpers.util import json_load, json_save
|
||||
|
||||
save_session = False
|
||||
print("")
|
||||
print("Blink Login Debug Script ...")
|
||||
print(" ... Loading previous session information.")
|
||||
cwd = os.getcwd()
|
||||
print(f" ... Looking in {cwd}.")
|
||||
session_path = os.path.join(cwd, ".session_debug")
|
||||
session = json_load(session_path)
|
||||
|
||||
try:
|
||||
auth_file = session["file"]
|
||||
except (TypeError, KeyError):
|
||||
print(" ... Please input location of auth file")
|
||||
auth_file = input(" Must contain username and password: ")
|
||||
save_session = True
|
||||
|
||||
data = json_load(auth_file)
|
||||
if data is None:
|
||||
print(f" ... Please fix file contents of {auth_file}.")
|
||||
print(" ... Exiting.")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
username = data["username"]
|
||||
password = data["password"]
|
||||
except KeyError:
|
||||
print(f" ... File contents of {auth_file} incorrect.")
|
||||
print(" ... Require username and password at minimum.")
|
||||
print(" ... Exiting.")
|
||||
sys.exit(1)
|
||||
|
||||
if save_session:
|
||||
print(f" ... Saving session file to {session_path}.")
|
||||
json_save({"file": auth_file}, session_path)
|
||||
|
||||
blink = Blink()
|
||||
auth = Auth(data)
|
||||
blink.auth = auth
|
||||
|
||||
print(" ... Starting Blink.")
|
||||
print("")
|
||||
blink.start()
|
||||
print("")
|
||||
print(" ... Printing login response.")
|
||||
print("")
|
||||
print(blink.auth.login_response)
|
||||
print("")
|
||||
print(" ... Printing login attributes.")
|
||||
print("")
|
||||
print(blink.auth.login_attributes)
|
||||
print("")
|
||||
input(" ... Press any key to continue: ")
|
||||
print(" ... Deactivating auth token.")
|
||||
blink.auth.token = "foobar"
|
||||
print(f"\t - blink.auth.token = {blink.auth.token}")
|
||||
|
||||
print(" ... Attempting login.")
|
||||
print("")
|
||||
blink.start()
|
||||
print("")
|
||||
print(" ... Printing login response.")
|
||||
print("")
|
||||
print(blink.auth.login_response)
|
||||
print("")
|
||||
print(" ... Printing login attributes.")
|
||||
print("")
|
||||
print(blink.auth.login_attributes)
|
||||
print("")
|
||||
rint(" ... Done.")
|
||||
print("")
|
||||
@@ -10,5 +10,5 @@ pytest-cov==2.11.1
|
||||
pytest-sugar==0.9.4
|
||||
pytest-timeout==1.4.2
|
||||
restructuredtext-lint==1.3.2
|
||||
pygments==2.7.4
|
||||
pygments==2.8.0
|
||||
testtools>=2.4.0
|
||||
|
||||
Reference in New Issue
Block a user