import valaw
import asyncio
async def main():
client = valaw.Client("YOUR_TOKEN", "americas")
try:
status = await client.GET_getPlatformData("na")
print(f"Platform: {status.name}")
if status.incidents:
print(f"Active incidents: {len(status.incidents)}")
for incident in status.incidents:
en_title = next((t for t in incident.titles if t.locale == "en_US"), None)
if en_title:
print(f" - {en_title.content}")
else:
print("No active incidents")
if status.maintenances:
print(f"Maintenances: {len(status.maintenances)}")
finally:
await client.close()
asyncio.run(main())