Skip to content

Commit 663c857

Browse files
author
Oluwafemi Adenuga
authored
Statuses client
2 parents a33e7c3 + fbdfc43 commit 663c857

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

openproject/client.py

+9
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)