npm install earthquake-turkey
const { earthquake } = require('earthquake-turkey')
const date = () => new Date()
console.log(date(), 'System opened!')
earthquake.on('quake', object => {
console.log(date(), 'Yeni bir deprem oldu!', object)
})
{
"date": "2023.04.13 02:07:34",
"latitude": "40.6332",
"longitude": "29.1290",
"depth": "10.8",
"ml": "1.5",
"place": "Hasanbaba, Hasanbaba Cd. 74, 77300 Çınarcık/Yalova",
"image": "https://maps.gstatic.com/tactile/pane/default_geocode-2x.png",
"location": "https://www.google.com.tr/maps/place/40.6332,29.1290"
}
Seçenek | Tip | Açıklama |
---|---|---|
minimum |
number |
Minimum büyüklükteki depremleri gösterir. Varsayılan: 0 ve üzeri. |
count |
number |
Gösterilecek deprem sayısı. Varsayılan: 20 tane. |
controlled |
number |
Kontrol edilecek deprem sayısı. Varsayılan: 20 tane. |
const { earthquakes } = require('earthquake-turkey')
const date = () => new Date()
console.log(date(), 'System opened!')
earthquakes({ count: 3 }).then(datas => {
console.log(date(), 'here are the past 3 earthquakes:', datas)
})
[{...}, {...}, {...}]
E-posta: me@cihatksm.com adresinden bana ulaşın.
Kandillii Rasathanesi Ve Deprem Araştırma Enstitüsü, Bölgesel Deprem-Tsunami İzleme Ve Değerlendirme Merkezi tarafından sunulan bilgileri içermektedir.
Herhangi bir sorun teşkil ediyorsa, problem oluşturuyorsa ya da oluşturduysa önce tarafıma bilgi verilmesi rica olunur.