Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make oAuth client related parameters optional #22

Merged
merged 8 commits into from
Mar 12, 2024
10 changes: 5 additions & 5 deletions sinch/core/clients/sinch_client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class ClientAsync(ClientBase):
"""
def __init__(
self,
key_id,
key_secret,
project_id,
logger_name=None,
logger=None,
key_id: str = None,
key_secret: str = None,
project_id: str = None,
logger_name: str = None,
logger: str = None,
application_key: str = None,
application_secret: str = None
):
Expand Down
12 changes: 6 additions & 6 deletions sinch/core/clients/sinch_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class ClientBase(ABC):
@abstractmethod
def __init__(
self,
key_id,
key_secret,
project_id,
logger_name=None,
logger=None,
key_id: str = None,
key_secret: str = None,
project_id: str = None,
logger_name: str = None,
logger: str = None,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is logger is really an str?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops; I've copy/pasted too much. Fixed

application_key: str = None,
application_secret: str = None
):
pass

def __repr__(self):
return f"Sinch SDK client for project_id: {self.configuration.project_id}"
return "Sinch SDK client"
10 changes: 5 additions & 5 deletions sinch/core/clients/sinch_client_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class Client(ClientBase):
"""
def __init__(
self,
key_id,
key_secret,
project_id,
logger_name=None,
logger=None,
key_id: str = None,
key_secret: str = None,
project_id: str = None,
logger_name: str = None,
logger: str = None,
application_key: str = None,
application_secret: str = None
):
Expand Down
Loading