diff --git a/src/monday_sdk/client.py b/src/monday_sdk/client.py index f985b44..1f76a1d 100644 --- a/src/monday_sdk/client.py +++ b/src/monday_sdk/client.py @@ -1,3 +1,5 @@ +from typing import Dict, Optional + from .modules import BoardModule, ItemModule, UpdateModule, CustomModule, ActivityLogModule, DocsModule from .constants import API_VERSION, DEFAULT_MAX_RETRY_ATTEMPTS from .graphql_handler import MondayGraphQL @@ -6,15 +8,21 @@ class MondayClient: - def __init__(self, token, headers=None, debug_mode=False, max_retry_attempts=DEFAULT_MAX_RETRY_ATTEMPTS): + def __init__( + self, + token: str, + headers: Optional[Dict[str, str]] = None, + debug_mode: bool = False, + max_retry_attempts: int = DEFAULT_MAX_RETRY_ATTEMPTS, + ) -> None: headers = headers or BASE_HEADERS.copy() - + # Create a single GraphQL client instance self._graphql_client = MondayGraphQL( token=token, headers=headers, debug_mode=debug_mode, - max_retry_attempts=max_retry_attempts + max_retry_attempts=max_retry_attempts, ) # Pass the GraphQL client to each module