mirror of
https://github.com/PaiGramTeam/EnkaNetwork.py.git
synced 2024-11-16 03:45:28 +00:00
3ec03d9b06
- add http client - update example - add aenter, aexit for auto close client
15 lines
371 B
Python
15 lines
371 B
Python
import asyncio
|
|
|
|
from enkanetwork import EnkaNetworkAPI
|
|
|
|
client = EnkaNetworkAPI(lang="th", debug=True)
|
|
|
|
async def main():
|
|
async with client:
|
|
# Change language to "en"
|
|
client.lang = "en"
|
|
# Or you can use set_language() function (EN -> TW)
|
|
await client.set_language("cht")
|
|
|
|
loop = asyncio.get_event_loop()
|
|
loop.run_until_complete(main()) |