@@ 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 |
@@ 4509-4527 (lines=19) @@ | ||
4506 | ||
4507 | return self._send_xml_command(cmd) |
|
4508 | ||
4509 | def delete_tag( |
|
4510 | self, tag_id: str, *, ultimate: Optional[bool] = False |
|
4511 | ) -> Any: |
|
4512 | """Deletes an existing tag |
|
4513 | ||
4514 | Arguments: |
|
4515 | tag_id: UUID of the tag to be deleted. |
|
4516 | ultimate: Whether to remove entirely, or to the trashcan. |
|
4517 | """ |
|
4518 | if not tag_id: |
|
4519 | raise RequiredArgument( |
|
4520 | function=self.delete_tag.__name__, argument='tag_id' |
|
4521 | ) |
|
4522 | ||
4523 | cmd = XmlCommand("delete_tag") |
|
4524 | cmd.set_attribute("tag_id", tag_id) |
|
4525 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
4526 | ||
4527 | return self._send_xml_command(cmd) |
|
4528 | ||
4529 | def delete_target( |
|
4530 | self, target_id: str, *, ultimate: Optional[bool] = False |