@@ 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, |
@@ 5491-5518 (lines=28) @@ | ||
5488 | ||
5489 | return self._send_xml_command(cmd) |
|
5490 | ||
5491 | def get_report_format( |
|
5492 | self, report_format_id: Union[str, ReportFormatType] |
|
5493 | ) -> Any: |
|
5494 | """Request a single report format |
|
5495 | ||
5496 | Arguments: |
|
5497 | report_format_id: UUID of an existing report format |
|
5498 | or ReportFormatType (enum) |
|
5499 | ||
5500 | Returns: |
|
5501 | The response. See :py:meth:`send_command` for details. |
|
5502 | """ |
|
5503 | cmd = XmlCommand("get_report_formats") |
|
5504 | ||
5505 | if not report_format_id: |
|
5506 | raise RequiredArgument( |
|
5507 | function=self.get_report_format.__name__, |
|
5508 | argument='report_format_id', |
|
5509 | ) |
|
5510 | ||
5511 | if isinstance(report_format_id, ReportFormatType): |
|
5512 | report_format_id = report_format_id.value |
|
5513 | ||
5514 | cmd.set_attribute("report_format_id", report_format_id) |
|
5515 | ||
5516 | # for single entity always request all details |
|
5517 | cmd.set_attribute("details", "1") |
|
5518 | return self._send_xml_command(cmd) |
|
5519 | ||
5520 | def get_results( |
|
5521 | self, |