Add reload method to OxiAPI class
- Implemented a new `reload` method to fetch the reload status from the API. - The method raises an error for unsuccessful responses and returns the status code on success.
This commit is contained in:
@@ -26,3 +26,8 @@ class OxiAPI:
|
|||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
return self._session.close()
|
return self._session.close()
|
||||||
|
|
||||||
|
def reload(self):
|
||||||
|
reload_response = self._session.get(f"{self.base_url}/reload")
|
||||||
|
reload_response.raise_for_status()
|
||||||
|
return reload_response.status_code
|
||||||
|
|||||||
Reference in New Issue
Block a user