diff --git a/openproject/client.py b/openproject/client.py index 7abd848..18dbe62 100644 --- a/openproject/client.py +++ b/openproject/client.py @@ -11,6 +11,7 @@ def __init__(self, base_url: str, api_token: str): self.work_packages = WorkPackages(self) self.projects = Projects(self) + self.statuses = Statuses(self) def _handle_response(self, response: httpx.Response): if response.status_code == 401: @@ -131,3 +132,11 @@ def update(self, id: int, **kwargs): def delete(self, id: int): return self.client._send_request("DELETE", f"/projects/{id}") + + +class Statuses(SubClient): + def list(self): + return self.client._send_request("GET", "/statuses") + + def view(self, id: int): + return self.client._send_request("GET", f"/statuses/{id}")