-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
28 lines (21 loc) · 717 Bytes
/
test.py
File metadata and controls
28 lines (21 loc) · 717 Bytes
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
27
28
import os
from asyncio import run
from dotenv import load_dotenv
from icecream import ic
from ua_alarm import Client as UkraineAlertApiClient
# Clear the console screen
os.system('cls' if os.name == 'nt' else 'clear')
load_dotenv()
client = UkraineAlertApiClient(os.getenv("UA_ALARM_API_KEY"))
# Run the main function
if __name__ == '__main__':
try:
# run(client.get_alerts())
# history = run(client.get_region_history(12))
# history = history[0].alarms[0].alertType
# ic(client.refactor_alert_type(history))
# ic(run(client.get_regions()))
ic(run(client.get_alerts()))
# run(client.alert_loop(12, True))
except KeyboardInterrupt:
exit()