Skip to content

Commit b7cb9a5

Browse files
committed
feat: add refresh_access_token_async stub to openapi.pyi
1 parent 5ed845d commit b7cb9a5

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

python/pysrc/longbridge/openapi.pyi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,26 @@ class Config:
419419
New access token string
420420
"""
421421

422+
async def refresh_access_token_async(
423+
self,
424+
expired_at: Optional[datetime] = None,
425+
) -> str:
426+
"""
427+
Async version of :meth:`Config.refresh_access_token`. Returns an
428+
awaitable; must be awaited inside asyncio.
429+
430+
This method is only available when using **Legacy API Key**
431+
authentication (i.e. :meth:`Config.from_apikey`). It is not supported
432+
for OAuth 2.0 mode.
433+
434+
Args:
435+
expired_at: The expiration time of the access token (default: 90
436+
days from now).
437+
438+
Returns:
439+
New access token string
440+
"""
441+
422442
class Language:
423443
"""
424444
Language identifier

0 commit comments

Comments
 (0)