Skip to content

Commit 4952d0d

Browse files
authored
Merge pull request #5 from getmaxun/develop
chore: release v0.0.4
2 parents 5ba85b9 + d45edce commit 4952d0d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ async def update_robot(self, robot_id: str, updates: dict):
8484
async def delete_robot(self, robot_id: str):
8585
await self._handle(self.client.delete(f"/robots/{robot_id}"))
8686

87+
async def duplicate_robot(self, robot_id: str, target_url: str):
88+
return await self._handle(
89+
self.client.post(f"/robots/{robot_id}/duplicate", json={"targetUrl": target_url})
90+
)
91+
8792
async def execute_robot(self, robot_id: str, options: Optional[dict] = None):
8893
return await self._handle(
8994
self.client.post(

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "maxun"
7-
version = "0.0.3"
7+
version = "0.0.4"
88
description = "Python SDK for Maxun - web automation and data extraction"
99
requires-python = ">=3.8"
1010
license = { text = "MIT" }

robot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ async def update(self, updates: dict) -> None:
6262
updated = await self.client.update_robot(self.id, updates)
6363
self.robot_data = updated
6464

65+
async def duplicate(self, target_url: str):
66+
new_robot_data = await self.client.duplicate_robot(self.id, target_url)
67+
return Robot(self.client, new_robot_data)
68+
6569
async def delete(self) -> None:
6670
await self.client.delete_robot(self.id)
6771

0 commit comments

Comments
 (0)