Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clip recording for Blink Mini and Doorbell camera models #946

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions blinkpy/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,17 @@
await api.wait_for_command(self.sync.blink, response)
return response

async def record(self):
"""Initiate clip recording for a blink mini camera."""
url = (

Check warning on line 521 in blinkpy/camera.py

View check run for this annotation

Codecov / codecov/patch

blinkpy/camera.py#L521

Added line #L521 was not covered by tests
f"{self.sync.urls.base_url}/api/v1/accounts/"
f"{self.sync.blink.account_id}/networks/"
f"{self.network_id}/owls/{self.camera_id}/clip"
)
response = await api.http_post(self.sync.blink, url)
await api.wait_for_command(self.sync.blink, response)
return response

Check warning on line 528 in blinkpy/camera.py

View check run for this annotation

Codecov / codecov/patch

blinkpy/camera.py#L526-L528

Added lines #L526 - L528 were not covered by tests

async def snap_picture(self):
"""Snap picture for a blink mini camera."""
url = (
Expand Down Expand Up @@ -575,6 +586,18 @@
await api.wait_for_command(self.sync.blink, response)
return response

async def record(self):
"""Initiate clip recording for a blink doorbell camera."""
url = (

Check warning on line 591 in blinkpy/camera.py

View check run for this annotation

Codecov / codecov/patch

blinkpy/camera.py#L591

Added line #L591 was not covered by tests
f"{self.sync.urls.base_url}/api/v1/accounts/"
f"{self.sync.blink.account_id}/networks/"
f"{self.sync.network_id}/doorbells/{self.camera_id}/clip"
)

response = await api.http_post(self.sync.blink, url)
await api.wait_for_command(self.sync.blink, response)
return response

Check warning on line 599 in blinkpy/camera.py

View check run for this annotation

Codecov / codecov/patch

blinkpy/camera.py#L597-L599

Added lines #L597 - L599 were not covered by tests

async def snap_picture(self):
"""Snap picture for a blink doorbell camera."""
url = (
Expand Down
Loading