diff --git a/pyprusalink/__init__.py b/pyprusalink/__init__.py index 37d1236..9107eab 100644 --- a/pyprusalink/__init__.py +++ b/pyprusalink/__init__.py @@ -38,6 +38,11 @@ async def resume_job(self, jobId: int) -> None: async with self.client.request("PUT", f"/api/v1/job/{jobId}/resume"): pass + async def continue_job(self, jobId: int) -> None: + """Continue a job after a timelapse capture.""" + async with self.client.request("PUT", f"/api/v1/job/{jobId}/continue"): + pass + async def get_version(self) -> VersionInfo: """Get the version.""" async with self.client.request("GET", "/api/version") as response: diff --git a/tests/test_prusalink.py b/tests/test_prusalink.py index 498852f..ceb87d4 100644 --- a/tests/test_prusalink.py +++ b/tests/test_prusalink.py @@ -141,6 +141,13 @@ async def test_resume_job(pl, respx_mock): await pl.resume_job(42) +async def test_continue_job(pl, respx_mock): + respx_mock.put(f"{HOST}/api/v1/job/42/continue").mock( + return_value=httpx.Response(204) + ) + await pl.continue_job(42) + + async def test_get_file(pl, respx_mock): thumbnail_bytes = b"\x89PNG\r\nfake-image-data" respx_mock.get(f"{HOST}/api/thumbnails/test.png").mock(