-
Notifications
You must be signed in to change notification settings - Fork 26
/
info.py
26 lines (22 loc) · 969 Bytes
/
info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import asyncio
from enkanetwork import EnkaNetworkAPI
client = EnkaNetworkAPI(lang="th")
async def main():
async with client:
data = await client.fetch_user(843715177)
print("=== Player Info ===")
print(f"Nickname: {data.player.nickname}")
print(f"Level: {data.player.level}")
print(f"Icon: {data.player.avatar.icon.url}")
print(f"Signature: {data.player.signature}")
print(f"Achievement: {data.player.achievement}")
print(f"Abyss floor: {data.player.abyss_floor} - {data.player.abyss_room}")
print(f"Cache timeout: {data.ttl}")
print("=== Characters Preview ===")
for charactersPreview in data.player.characters_preview:
print("ID:", charactersPreview.id)
print("Name:", charactersPreview.name)
print("Icon:", charactersPreview.icon.url)
print("Level:", charactersPreview.level)
print("="*18)
asyncio.run(main())