From 7e8446389ed2942fae5aa3e642db7960d8bac544 Mon Sep 17 00:00:00 2001 From: IluaAir Date: Thu, 12 Mar 2026 20:15:52 +0300 Subject: [PATCH] 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. --- oxi/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/oxi/core.py b/oxi/core.py index c5c0386..9a618f2 100644 --- a/oxi/core.py +++ b/oxi/core.py @@ -26,3 +26,8 @@ class OxiAPI: def close(self): 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