Skip to content

Commit

Permalink
✅ Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
mobyw committed Feb 6, 2024
1 parent 907b574 commit 5cdda31
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cdda31

Please sign in to comment.