| @@ 5459-5486 (lines=28) @@ | ||
| 5456 | ||
| 5457 | return self._send_xml_command(cmd) |
|
| 5458 | ||
| 5459 | def get_report_format( |
|
| 5460 | self, report_format_id: Union[str, ReportFormatType] |
|
| 5461 | ) -> Any: |
|
| 5462 | """Request a single report format |
|
| 5463 | ||
| 5464 | Arguments: |
|
| 5465 | report_format_id: UUID of an existing report format |
|
| 5466 | or ReportFormatType (enum) |
|
| 5467 | ||
| 5468 | Returns: |
|
| 5469 | The response. See :py:meth:`send_command` for details. |
|
| 5470 | """ |
|
| 5471 | cmd = XmlCommand("get_report_formats") |
|
| 5472 | ||
| 5473 | if not report_format_id: |
|
| 5474 | raise RequiredArgument( |
|
| 5475 | function=self.get_report_format.__name__, |
|
| 5476 | argument='report_format_id', |
|
| 5477 | ) |
|
| 5478 | ||
| 5479 | if isinstance(report_format_id, ReportFormatType): |
|
| 5480 | report_format_id = report_format_id.value |
|
| 5481 | ||
| 5482 | cmd.set_attribute("report_format_id", report_format_id) |
|
| 5483 | ||
| 5484 | # for single entity always request all details |
|
| 5485 | cmd.set_attribute("details", "1") |
|
| 5486 | return self._send_xml_command(cmd) |
|
| 5487 | ||
| 5488 | def get_results( |
|
| 5489 | self, |
|
| @@ 3825-3852 (lines=28) @@ | ||
| 3822 | ||
| 3823 | return self._send_xml_command(cmd) |
|
| 3824 | ||
| 3825 | def get_report_format( |
|
| 3826 | self, report_format_id: Union[str, ReportFormatType] |
|
| 3827 | ) -> Any: |
|
| 3828 | """Request a single report format |
|
| 3829 | ||
| 3830 | Arguments: |
|
| 3831 | report_format_id: UUID of an existing report format |
|
| 3832 | or ReportFormatType (enum) |
|
| 3833 | ||
| 3834 | Returns: |
|
| 3835 | The response. See :py:meth:`send_command` for details. |
|
| 3836 | """ |
|
| 3837 | cmd = XmlCommand("get_report_formats") |
|
| 3838 | ||
| 3839 | if not report_format_id: |
|
| 3840 | raise RequiredArgument( |
|
| 3841 | function=self.get_report_format.__name__, |
|
| 3842 | argument='report_format_id', |
|
| 3843 | ) |
|
| 3844 | ||
| 3845 | if isinstance(report_format_id, ReportFormatType): |
|
| 3846 | report_format_id = report_format_id.value |
|
| 3847 | ||
| 3848 | cmd.set_attribute("report_format_id", report_format_id) |
|
| 3849 | ||
| 3850 | # for single entity always request all details |
|
| 3851 | cmd.set_attribute("details", "1") |
|
| 3852 | return self._send_xml_command(cmd) |
|
| 3853 | ||
| 3854 | def get_results( |
|
| 3855 | self, |
|