Skip to content

Commit

Permalink
Merge pull request #175 from N4S4/shutdown_version
Browse files Browse the repository at this point in the history
possibility to change version
  • Loading branch information
N4S4 authored Sep 12, 2024
2 parents 046966c + 79840b3 commit 8e42ca9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions synology_api/core_sys_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,15 @@ def get_memory_utilization(self) -> str:

return self.request_data(api_name, api_path, req_param)['data']['memory']

def shutdown(self):
def shutdown(self, version: str = None) -> dict[str, object] | str:
api_name = 'SYNO.Core.System'
info = self.core_list[api_name]
api_path = info['path']
req_param = {'version': info['maxVersion'], 'method': 'shutdown'}
req_param = {'version': (info['maxVersion'] if version is None else version), 'method': 'shutdown'}

return self.request_data(api_name, api_path, req_param)

def reboot(self):
def reboot(self) -> dict[str, object] | str:
api_name = 'SYNO.Core.System'
info = self.core_list[api_name]
api_path = info['path']
Expand Down

0 comments on commit 8e42ca9

Please sign in to comment.