Skip to content

Commit 2480369

Browse files
committed
Add status client
1 parent 5306a35 commit 2480369

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

openproject/client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def __init__(self, base_url: str, api_token: str):
1111

1212
self.work_packages = WorkPackages(self)
1313
self.projects = Projects(self)
14+
self.statuses = Statuses(self)
1415

1516
def _handle_response(self, response: httpx.Response):
1617
if response.status_code == 401:
@@ -131,3 +132,11 @@ def update(self, id: int, **kwargs):
131132

132133
def delete(self, id: int):
133134
return self.client._send_request("DELETE", f"/projects/{id}")
135+
136+
137+
class Statuses(SubClient):
138+
def list(self):
139+
return self.client._send_request("GET", "/statuses")
140+
141+
def view(self, id: int):
142+
return self.client._send_request("GET", f"/statuses/{id}")

0 commit comments

Comments
 (0)