Skip to content

Commit

Permalink
Merge pull request #24 from pinterest/fix/pinterest-sdk-client-config…
Browse files Browse the repository at this point in the history
…-param-fix

fix: missing key `configuration` in PinterestSDKClient
  • Loading branch information
dfana01 authored Nov 22, 2022
2 parents 54586f9 + afe1a73 commit 6be0aed
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions pinterest/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,25 @@ def __init__(self, access_token=None, refresh_token=None, app_id=None, app_secre
@classmethod
def create_client_with_refresh_token(cls, refresh_token: str, app_id: str, app_secret: str):
"""Get a new SDK client with the given refresh token, app id and app secret."""
access_token = cls._get_access_token(refresh_token, app_id, app_secret)
return PinterestSDKClient(cls._get_config(access_token))
access_token = cls._get_access_token(
refresh_token=refresh_token,
app_id=app_id,
app_secret=app_secret
)
return PinterestSDKClient(
configuration=cls._get_config(
access_token=access_token
)
)

@classmethod
def create_client_with_token(cls, access_token: str):
"""Get a new SDK client with the given access token."""
return PinterestSDKClient(cls._get_config(access_token))
return PinterestSDKClient(
configuration=cls._get_config(
access_token=access_token
)
)

@classmethod
def set_default_client(cls, client):
Expand Down

0 comments on commit 6be0aed

Please sign in to comment.