Skip to content

pxsty0/pxsty.earthquakes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pxsty.earthquakes

pxsty.earthquakes, AFAD (Afet ve Acil Durum Yönetimi Başkanlığı) web sitesinden son depremleri çekmek için geliştirilmiş bir Node.js kütüphanesidir.

Kütüphaneyi, depremin 2. yılını anarken yeniliyorum. Vefat eden herkese Allah'tan rahmet, yaralanan herkese şifalar diliyorum. Ülkemiz için böyle acı dolu anların bir daha yaşanmaması dileğiyle.

Kurulum

npm install pxsty.earthquakes

veya

yarn add pxsty.earthquakes

Kullanım

TypeScript Örneği

import EarthquakeAPI from "pxsty.earthquakes";

const fetchEarthquakes = async () => {
  const earthquakes = await EarthquakeAPI.getAllEarthquakes();
  try {
    console.log("Depremler:", earthquakes);
  } catch (err) {
    console.error("Veri çekme hatası!", err);
  }
};

fetchEarthquakes();

JavaScript Örneği

const EarthquakeAPI = require("pxsty.earthquakes").default;

const fetchEarthquakes = async () => {
  const earthquakes = await EarthquakeAPI.getAllEarthquakes();
  try {
    console.log("Depremler:", earthquakes);
  } catch (err) {
    console.error("Veri çekme hatası!", err);
  }
};

fetchEarthquakes();

Dönen Veri Formatı

Başarılı bir istek aşağıdaki formatta bir dizi deprem verisi döndürür:

[
  {
    date: 2025-04-25T08:41:51.000Z,
    latitude: 39.35639,
    longitude: 28.85528,
    depth: 7.17,
    type: 'ML',
    size: 1.4,
    place: 'Dursunbey (Balıkesir)'
  }
]

Desteklenen Magnitüd Türleri

  • ML: Yerel magnitüd
  • MW: Moment magnitüdü

Lisans

MIT Lisansı altında sunulmaktadır.

About

Türkiye de gerçekleşen depremleri listeler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published