Skip to content

Commit fcac70e

Browse files
fishterCFenner
andauthored
feat: create reboot gateway function (#549)
* Update PyViCareService.py Add reboot gateway function * Apply suggestions from code review * Apply suggestions from code review --------- Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
1 parent eb922bb commit fcac70e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

PyViCare/PyViCareService.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@ def fetch_all_features(self) -> Any:
6262
if self._isGateway():
6363
url = f'/features/installations/{self.accessor.id}/gateways/{self.accessor.serial}/features/'
6464
return self.oauth_manager.get(url)
65+
66+
def reboot_gateway(self) -> Any:
67+
url = f'/equipment/installations/{self.accessor.id}/gateways/{self.accessor.serial}/reboot'
68+
data = "{}"
69+
return self.oauth_manager.post(url, data)

0 commit comments

Comments
 (0)