From 258160e9e1f74e65c8555f9bb946f79681c4c888 Mon Sep 17 00:00:00 2001 From: welann <49773825+welann@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:40:17 +0800 Subject: [PATCH] Update example in README.md Since the original example couldn't run after the AccountApi was changed, it is fixed here. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 560dcb3..1e47546 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,12 @@ import asyncio async def main(): client = lighter.ApiClient() account_api = lighter.AccountApi(client) - account = await account_api.get_account(by="index", value="1") - print(account) + try: + account = await account_api.account(by="index", value="1") + print(account) + finally: + await client.close() + if __name__ == "__main__": asyncio.run(main())