From c685db3b1f126bc0639cc6e58a262239d46c9503 Mon Sep 17 00:00:00 2001 From: Oluwafemi Adenuga Date: Tue, 9 Jan 2024 13:28:57 +0100 Subject: [PATCH 1/2] Get project types --- openproject/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openproject/client.py b/openproject/client.py index 18d38a0..d5d586d 100644 --- a/openproject/client.py +++ b/openproject/client.py @@ -133,6 +133,9 @@ def update(self, id: int, **kwargs): def delete(self, id: int): return self.client._send_request("DELETE", f"projects/{id}") + def types(self, id: int): + return self.client._send_request("GET", f"projects/{id}/types") + class Statuses(SubClient): def list(self): From f7fc263c6e2d528475fd66135ae99f047c7e776d Mon Sep 17 00:00:00 2001 From: Oluwafemi Adenuga Date: Tue, 9 Jan 2024 13:52:13 +0100 Subject: [PATCH 2/2] rename method --- openproject/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openproject/client.py b/openproject/client.py index d5d586d..1c81120 100644 --- a/openproject/client.py +++ b/openproject/client.py @@ -133,7 +133,7 @@ def update(self, id: int, **kwargs): def delete(self, id: int): return self.client._send_request("DELETE", f"projects/{id}") - def types(self, id: int): + def list_types(self, id: int): return self.client._send_request("GET", f"projects/{id}/types")