From 9b9585f02f4bd1dae6ee7bc58f089a210bc8e3da Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Wed, 6 Mar 2024 19:52:03 +0000 Subject: [PATCH] docs: deprecate old access token getter --- api.md | 1 - src/finch/_client.py | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/api.md b/api.md index 34051553..80dfe151 100644 --- a/api.md +++ b/api.md @@ -8,7 +8,6 @@ from finch.types import ConnectionStatusType, OperationSupport, OperationSupport Methods: -- client.get_access_token(\*args) -> str - client.get_auth_url(\*args) -> str - client.with_access_token(\*args) -> Self diff --git a/src/finch/_client.py b/src/finch/_client.py index 5b7be7f9..c86d8e35 100644 --- a/src/finch/_client.py +++ b/src/finch/_client.py @@ -307,11 +307,7 @@ def get_access_token( *, redirect_uri: str | None = None, ) -> str: - """Returns an access token for the Finch API given an authorization code. - - An authorization code can be obtained by visiting the url returned by - get_auth_url(). - """ + """DEPRECATED: use client.access_tokens.create instead.""" if self.client_id is None: raise ValueError("Expected client_id to be set in order to call get_access_token") @@ -659,11 +655,7 @@ async def get_access_token( *, redirect_uri: str | None = None, ) -> str: - """Returns an access token for the Finch API given an authorization code. - - An authorization code can be obtained by visiting the url returned by - get_auth_url(). - """ + """DEPRECATED: use client.access_tokens.create instead.""" if self.client_id is None: raise ValueError("Expected client_id to be set in order to call get_access_token")