-
Notifications
You must be signed in to change notification settings - Fork 8
/
bmkg.py
21 lines (18 loc) · 790 Bytes
/
bmkg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from justgood import imjustgood
media = imjustgood("YOUR_APIKEY_HERE")
data = media.bmkg()
# Get attributes
result = "Info Gempa BMKG"
result += "\nTanggal : {}".format(data["result"]["tanggal"])
result += "\nPukul : {}".format(data["result"]["pukul"])
result += "\nLokasi : {}".format(data["result"]["lokasi"])
result += "\nWilayah : {}".format(data["result"]["wilayah"])
result += "\nKordinat : {}".format(data["result"]["kordinat"])
result += "\nKedalaman : {}".format(data["result"]["kedalaman"])
result += "\nKekuatan : {}".format(data["result"]["kekuatan"])
result += "\nArahan : {}".format(data["result"]["arahan"])
result += "\nSaran : {}".format(data["result"]["saran"])
result += "\nPeta Skema : {}".format(data["result"]["skema"])
print(result)
# Get JSON results
print(data)