-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (25 loc) · 907 Bytes
/
Copy pathmain.py
File metadata and controls
31 lines (25 loc) · 907 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
29
30
31
import requests
if __name__ == "__main__":
# individual datacake webhook url
# Change this to the webhook url of your datacake device/product
datacake_url = "https://api.datacake.co/integrations/api/ae6dd531-4cf6-4966-b5c9-6c43939aae90/"
# Serial number
# Include Serial Number in Payload so Datacake can route information
# based on serial of device
serial = "python0001"
# Just some random demo data
number_of_persons_a = 234
number_of_persons_b = 345
additional_payload = "bla bla"
some_data = 23.456
a_boolean = True
# create api call
r = requests.post(datacake_url, json={
"number_of_persons_a": number_of_persons_a,
"number_of_persons_b": number_of_persons_b,
"additional_payload": additional_payload,
"some_data": some_data,
"a_boolean": a_boolean,
"serial": serial
})
print(r)