Skip to content

Commit

Permalink
Initialize work package in client
Browse files Browse the repository at this point in the history
  • Loading branch information
Oluwafemi Adenuga authored Oct 12, 2023
2 parents a5c26ac + a351650 commit 32c1d78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openproject/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -49,6 +51,8 @@ def _send_request(


class SubClient(Client):
client: Client

def __init__(self, client: Client):
self.client = client

Expand Down

0 comments on commit 32c1d78

Please sign in to comment.