Skip to content

Commit a367892

Browse files
stainless-botstainless-app[bot]
authored andcommitted
docs: deprecate old access token getter (#315)
1 parent 3296aff commit a367892

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

api.md

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ from finch.types import ConnectionStatusType, OperationSupport, OperationSupport
88

99
Methods:
1010

11-
- <code>client.<a href="./src/finch/_client.py">get_access_token</a>(\*args) -> str</code>
1211
- <code>client.<a href="./src/finch/_client.py">get_auth_url</a>(\*args) -> str</code>
1312
- <code>client.<a href="./src/finch/_client.py">with_access_token</a>(\*args) -> Self</code>
1413

src/finch/_client.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,7 @@ def get_access_token(
307307
*,
308308
redirect_uri: str | None = None,
309309
) -> str:
310-
"""Returns an access token for the Finch API given an authorization code.
311-
312-
An authorization code can be obtained by visiting the url returned by
313-
get_auth_url().
314-
"""
310+
"""DEPRECATED: use client.access_tokens.create instead."""
315311
if self.client_id is None:
316312
raise ValueError("Expected client_id to be set in order to call get_access_token")
317313

@@ -659,11 +655,7 @@ async def get_access_token(
659655
*,
660656
redirect_uri: str | None = None,
661657
) -> str:
662-
"""Returns an access token for the Finch API given an authorization code.
663-
664-
An authorization code can be obtained by visiting the url returned by
665-
get_auth_url().
666-
"""
658+
"""DEPRECATED: use client.access_tokens.create instead."""
667659
if self.client_id is None:
668660
raise ValueError("Expected client_id to be set in order to call get_access_token")
669661

0 commit comments

Comments
 (0)