From 5cdda3195be4e34316898d427fbd6fdd8f29569f Mon Sep 17 00:00:00 2001 From: mobyw Date: Tue, 6 Feb 2024 21:47:21 +0800 Subject: [PATCH] :white_check_mark: Update example --- examples/example.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/example.py b/examples/example.py index f1961d1..2acbd78 100644 --- a/examples/example.py +++ b/examples/example.py @@ -33,10 +33,16 @@ async def main(): # # The following shows how to get original api data # data_origin = await api.get_api_data("100114514") - # print(data_origin) + # if data_origin: + # print(data_origin.detailInfo) # This will return a FormattedApiInfo object - data = await api.get_parsed_api_data("101797189") + data = await api.get_parsed_api_data("100114514") + if data: + print("Player UID:", data.player.uid) + print("Player Nickname:", data.player.nickname) + print("Player Level:", data.player.level) + print("Characters:", [c.name for c in data.characters]) # # The following shows how to save as json file import msgspec