forked from kuronekouwu/EnkaNetwork.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
namecards.py
26 lines (22 loc) · 910 Bytes
/
namecards.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("=== Namecard main ===")
print(f"ID: {data.player.namecard.id}")
print(f"Name: {data.player.namecard.name}")
print(f"Banner URL: {data.player.namecard.banner.url}")
print(f"Navbar URL: {data.player.namecard.navbar.url}")
print(f"Icon URL: {data.player.namecard.icon.url}")
print("\n")
print("=== List Namecard ===")
for namecard in data.player.namecards:
print(f"ID: {namecard.id}")
print(f"Name: {namecard.name}")
print(f"Banner URL: {namecard.banner.url}")
print(f"Navbar URL: {namecard.navbar.url}")
print(f"Icon URL: {namecard.icon.url}")
print("-"*18)
asyncio.run(main())