-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathphone_api.py
More file actions
28 lines (16 loc) · 760 Bytes
/
phone_api.py
File metadata and controls
28 lines (16 loc) · 760 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 requests
def bot_crashed(error):
url = "https://api.pushcut.io/YhAwjYaEHSWa1Xv109_Km/notifications/EulerBot%20crashed?text={0}"
url = url.format("Error message: " + str(error))
resp = requests.get(url)
return resp.status_code == 200
def bot_success(success):
url = "https://api.pushcut.io/YhAwjYaEHSWa1Xv109_Km/notifications/EulerBot%20Notification?text={0}"
url = url.format("Success: " + str(success))
resp = requests.get(url)
return resp.status_code == 200
def bot_info(message):
url = "https://api.pushcut.io/YhAwjYaEHSWa1Xv109_Km/notifications/EulerBot%20Notification?text={0}"
url = url.format(message)
resp = requests.get(url)
return resp.status_code == 200