@@ 4047-4071 (lines=25) @@ | ||
4044 | ||
4045 | return self._send_xml_command(cmd) |
|
4046 | ||
4047 | def get_schedule( |
|
4048 | self, schedule_id: str, *, tasks: Optional[bool] = None |
|
4049 | ) -> Any: |
|
4050 | """Request a single schedule |
|
4051 | ||
4052 | Arguments: |
|
4053 | schedule_id: UUID of an existing schedule |
|
4054 | tasks: Whether to include tasks using the schedules |
|
4055 | ||
4056 | Returns: |
|
4057 | The response. See :py:meth:`send_command` for details. |
|
4058 | """ |
|
4059 | cmd = XmlCommand("get_schedules") |
|
4060 | ||
4061 | if not schedule_id: |
|
4062 | raise RequiredArgument( |
|
4063 | function=self.get_schedule.__name__, argument='schedule_id' |
|
4064 | ) |
|
4065 | ||
4066 | cmd.set_attribute("schedule_id", schedule_id) |
|
4067 | ||
4068 | if tasks is not None: |
|
4069 | cmd.set_attribute("tasks", _to_bool(tasks)) |
|
4070 | ||
4071 | return self._send_xml_command(cmd) |
|
4072 | ||
4073 | def get_settings(self, *, filter: Optional[str] = None) -> Any: |
|
4074 | """Request a list of user settings |
@@ 5713-5737 (lines=25) @@ | ||
5710 | ||
5711 | return self._send_xml_command(cmd) |
|
5712 | ||
5713 | def get_schedule( |
|
5714 | self, schedule_id: str, *, tasks: Optional[bool] = None |
|
5715 | ) -> Any: |
|
5716 | """Request a single schedule |
|
5717 | ||
5718 | Arguments: |
|
5719 | schedule_id: UUID of an existing schedule |
|
5720 | tasks: Whether to include tasks using the schedules |
|
5721 | ||
5722 | Returns: |
|
5723 | The response. See :py:meth:`send_command` for details. |
|
5724 | """ |
|
5725 | cmd = XmlCommand("get_schedules") |
|
5726 | ||
5727 | if not schedule_id: |
|
5728 | raise RequiredArgument( |
|
5729 | function=self.get_schedule.__name__, argument='schedule_id' |
|
5730 | ) |
|
5731 | ||
5732 | cmd.set_attribute("schedule_id", schedule_id) |
|
5733 | ||
5734 | if tasks is not None: |
|
5735 | cmd.set_attribute("tasks", _to_bool(tasks)) |
|
5736 | ||
5737 | return self._send_xml_command(cmd) |
|
5738 | ||
5739 | def get_settings(self, *, filter: Optional[str] = None) -> Any: |
|
5740 | """Request a list of user settings |