| @@ 4477-4495 (lines=19) @@ | ||
| 4474 | ||
| 4475 | return self._send_xml_command(cmd) |
|
| 4476 | ||
| 4477 | def delete_tag( |
|
| 4478 | self, tag_id: str, *, ultimate: Optional[bool] = False |
|
| 4479 | ) -> Any: |
|
| 4480 | """Deletes an existing tag |
|
| 4481 | ||
| 4482 | Arguments: |
|
| 4483 | tag_id: UUID of the tag to be deleted. |
|
| 4484 | ultimate: Whether to remove entirely, or to the trashcan. |
|
| 4485 | """ |
|
| 4486 | if not tag_id: |
|
| 4487 | raise RequiredArgument( |
|
| 4488 | function=self.delete_tag.__name__, argument='tag_id' |
|
| 4489 | ) |
|
| 4490 | ||
| 4491 | cmd = XmlCommand("delete_tag") |
|
| 4492 | cmd.set_attribute("tag_id", tag_id) |
|
| 4493 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
| 4494 | ||
| 4495 | return self._send_xml_command(cmd) |
|
| 4496 | ||
| 4497 | def delete_target( |
|
| 4498 | self, target_id: str, *, ultimate: Optional[bool] = False |
|
| @@ 2600-2618 (lines=19) @@ | ||
| 2597 | ||
| 2598 | return self._send_xml_command(cmd) |
|
| 2599 | ||
| 2600 | def delete_tag( |
|
| 2601 | self, tag_id: str, *, ultimate: Optional[bool] = False |
|
| 2602 | ) -> Any: |
|
| 2603 | """Deletes an existing tag |
|
| 2604 | ||
| 2605 | Arguments: |
|
| 2606 | tag_id: UUID of the tag to be deleted. |
|
| 2607 | ultimate: Whether to remove entirely, or to the trashcan. |
|
| 2608 | """ |
|
| 2609 | if not tag_id: |
|
| 2610 | raise RequiredArgument( |
|
| 2611 | function=self.delete_tag.__name__, argument='tag_id' |
|
| 2612 | ) |
|
| 2613 | ||
| 2614 | cmd = XmlCommand("delete_tag") |
|
| 2615 | cmd.set_attribute("tag_id", tag_id) |
|
| 2616 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
| 2617 | ||
| 2618 | return self._send_xml_command(cmd) |
|
| 2619 | ||
| 2620 | def delete_target( |
|
| 2621 | self, target_id: str, *, ultimate: Optional[bool] = False |
|