Merge branch 'dev' into dependabot/pip/pytest-5.4.3
This commit is contained in:
+1
-3
@@ -4,7 +4,7 @@ A Python library for the Blink Camera system (Python 3.6+)
|
||||
|
||||
Like the library? Consider buying me a cup of coffee!
|
||||
|
||||
|Donate|
|
||||
`Buy me a Coffee! <https://buymeacoffee.com/kevinfronczak>`__
|
||||
|
||||
**Disclaimer:**
|
||||
Published under the MIT license - See LICENSE file for more details.
|
||||
@@ -191,7 +191,5 @@ Example usage, which downloads all videos recorded since July 4th, 2018 at 9:34a
|
||||
:target: https://pypi.python.org/pypi/blinkpy
|
||||
.. |Docs| image:: https://readthedocs.org/projects/blinkpy/badge/?version=latest
|
||||
:target: http://blinkpy.readthedocs.io/en/latest/?badge=latest
|
||||
.. |Donate| image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
|
||||
:target: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UR6Z2B8GXYUCC
|
||||
.. |Codestyle| image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
||||
:target: https://github.com/psf/black
|
||||
|
||||
@@ -60,6 +60,17 @@ def request_networks(blink):
|
||||
return http_get(blink, url)
|
||||
|
||||
|
||||
def request_network_update(blink, network):
|
||||
"""
|
||||
Request network update.
|
||||
|
||||
:param blink: Blink instance.
|
||||
:param network: Sync module network id.
|
||||
"""
|
||||
url = f"{blink.urls.base_url}/network/{network}/update"
|
||||
return http_post(blink, url)
|
||||
|
||||
|
||||
def request_user(blink):
|
||||
"""Get user information from blink servers."""
|
||||
url = f"{blink.urls.base_url}/user"
|
||||
@@ -212,6 +223,30 @@ def request_camera_info(blink, network, camera_id):
|
||||
return http_get(blink, url)
|
||||
|
||||
|
||||
def request_camera_usage(blink):
|
||||
"""
|
||||
Request camera status.
|
||||
|
||||
:param blink: Blink instance.
|
||||
"""
|
||||
url = f"{blink.urls.base_url}/api/v1/camera/usage"
|
||||
return http_get(blink, url)
|
||||
|
||||
|
||||
def request_camera_liveview(blink, network, camera_id):
|
||||
"""
|
||||
Request camera liveview.
|
||||
|
||||
:param blink: Blink instance.
|
||||
:param network: Sync module network id.
|
||||
:param camera_id: Camera ID of camera to request liveview from.
|
||||
"""
|
||||
url = (
|
||||
f"{blink.urls.base_url}/api/v3/networks/{network}/cameras/{camera_id}/liveview"
|
||||
)
|
||||
return http_post(blink, url)
|
||||
|
||||
|
||||
def request_camera_sensors(blink, network, camera_id):
|
||||
"""
|
||||
Request camera sensor info for one camera.
|
||||
|
||||
Reference in New Issue
Block a user