| @@ 4497-4515 (lines=19) @@ | ||
| 4494 | ||
| 4495 | return self._send_xml_command(cmd) |
|
| 4496 | ||
| 4497 | def delete_target( |
|
| 4498 | self, target_id: str, *, ultimate: Optional[bool] = False |
|
| 4499 | ) -> Any: |
|
| 4500 | """Deletes an existing target |
|
| 4501 | ||
| 4502 | Arguments: |
|
| 4503 | target_id: UUID of the target to be deleted. |
|
| 4504 | ultimate: Whether to remove entirely, or to the trashcan. |
|
| 4505 | """ |
|
| 4506 | if not target_id: |
|
| 4507 | raise RequiredArgument( |
|
| 4508 | function=self.delete_target.__name__, argument='target_id' |
|
| 4509 | ) |
|
| 4510 | ||
| 4511 | cmd = XmlCommand("delete_target") |
|
| 4512 | cmd.set_attribute("target_id", target_id) |
|
| 4513 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
| 4514 | ||
| 4515 | return self._send_xml_command(cmd) |
|
| 4516 | ||
| 4517 | def delete_task( |
|
| 4518 | self, task_id: str, *, ultimate: Optional[bool] = False |
|
| @@ 2620-2638 (lines=19) @@ | ||
| 2617 | ||
| 2618 | return self._send_xml_command(cmd) |
|
| 2619 | ||
| 2620 | def delete_target( |
|
| 2621 | self, target_id: str, *, ultimate: Optional[bool] = False |
|
| 2622 | ) -> Any: |
|
| 2623 | """Deletes an existing target |
|
| 2624 | ||
| 2625 | Arguments: |
|
| 2626 | target_id: UUID of the target to be deleted. |
|
| 2627 | ultimate: Whether to remove entirely, or to the trashcan. |
|
| 2628 | """ |
|
| 2629 | if not target_id: |
|
| 2630 | raise RequiredArgument( |
|
| 2631 | function=self.delete_target.__name__, argument='target_id' |
|
| 2632 | ) |
|
| 2633 | ||
| 2634 | cmd = XmlCommand("delete_target") |
|
| 2635 | cmd.set_attribute("target_id", target_id) |
|
| 2636 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
| 2637 | ||
| 2638 | return self._send_xml_command(cmd) |
|
| 2639 | ||
| 2640 | def delete_task( |
|
| 2641 | self, task_id: str, *, ultimate: Optional[bool] = False |
|