@@ 5681-5705 (lines=25) @@ | ||
5678 | ||
5679 | return self._send_xml_command(cmd) |
|
5680 | ||
5681 | def get_schedule( |
|
5682 | self, schedule_id: str, *, tasks: Optional[bool] = None |
|
5683 | ) -> Any: |
|
5684 | """Request a single schedule |
|
5685 | ||
5686 | Arguments: |
|
5687 | schedule_id: UUID of an existing schedule |
|
5688 | tasks: Whether to include tasks using the schedules |
|
5689 | ||
5690 | Returns: |
|
5691 | The response. See :py:meth:`send_command` for details. |
|
5692 | """ |
|
5693 | cmd = XmlCommand("get_schedules") |
|
5694 | ||
5695 | if not schedule_id: |
|
5696 | raise RequiredArgument( |
|
5697 | function=self.get_schedule.__name__, argument='schedule_id' |
|
5698 | ) |
|
5699 | ||
5700 | cmd.set_attribute("schedule_id", schedule_id) |
|
5701 | ||
5702 | if tasks is not None: |
|
5703 | cmd.set_attribute("tasks", _to_bool(tasks)) |
|
5704 | ||
5705 | return self._send_xml_command(cmd) |
|
5706 | ||
5707 | def get_settings(self, *, filter: Optional[str] = None) -> Any: |
|
5708 | """Request a list of user settings |
@@ 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 |