2022-07-05 06:38:08 +00:00
|
|
|
import asyncio
|
|
|
|
|
2022-07-05 08:47:27 +00:00
|
|
|
from enkanetwork import EnkaNetworkAPI
|
2022-07-05 06:38:08 +00:00
|
|
|
|
|
|
|
client = EnkaNetworkAPI(lang="th")
|
|
|
|
|
|
|
|
async def main():
|
|
|
|
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}")
|
|
|
|
print(f"Navbar URL: {data.player.namecard.navbar}")
|
|
|
|
print(f"Icon URL: {data.player.namecard.icon}")
|
|
|
|
print("\n")
|
|
|
|
print("=== List Namecard ===")
|
2022-07-16 19:36:56 +00:00
|
|
|
for namecard in data.player.namecards:
|
2022-07-05 06:38:08 +00:00
|
|
|
print(f"ID: {namecard.id}")
|
|
|
|
print(f"Name: {namecard.name}")
|
|
|
|
print(f"Banner URL: {namecard.banner}")
|
|
|
|
print(f"Navbar URL: {namecard.navbar}")
|
|
|
|
print(f"Icon URL: {namecard.icon}")
|
|
|
|
print("-"*18)
|
|
|
|
|
|
|
|
loop = asyncio.get_event_loop()
|
|
|
|
loop.run_until_complete(main())
|