From a351650663ca17bd6fbc2cb830829a4587ffa937 Mon Sep 17 00:00:00 2001 From: Oluwafemi Adenuga Date: Thu, 12 Oct 2023 04:44:12 +0100 Subject: [PATCH] Initialize work package in client --- openproject/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openproject/client.py b/openproject/client.py index 7a607b2..eb2874b 100644 --- a/openproject/client.py +++ b/openproject/client.py @@ -9,6 +9,8 @@ def __init__(self, base_url: str, api_token: str): self.api_version = "v3" self.api_token = api_token + self.work_packages = WorkPackages(self) + def _handle_response(self, response: httpx.Response): if response.status_code == 401: error = response.json().get("message", "Authentication error") @@ -49,6 +51,8 @@ def _send_request( class SubClient(Client): + client: Client + def __init__(self, client: Client): self.client = client