SkillAgentSearch skills...

Kandilli4j

A simple java api to read latest earthquakes from Kandilli Observatory and Earthquake Research Institute (Kandilli Rasathanesi)

Install / Use

/learn @bahtiyartan/Kandilli4j
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

kandilli4j

A simple java api to read latest earthquakes from Kandilli Observatory and Earthquake Research Institute (Kandilli Rasathanesi)

Kandilli Rasathanesi sayfasına bağlanarak son depremleri getiren basit bir api.

#usage

EarthquakeListProvider iProvider = new EarthquakeListProvider();

try {
	// reads all earthquakes
	Vector<EarthquakeInfo> all = iProvider.getLastEarthquakes();

	// reads last ten earthquakes
	Vector<EarthquakeInfo> lastten = iProvider.getLastEarthquakes(10);

	// reads all earthquakes greater than 4.0 (Ml)
	Vector<EarthquakeInfo> allGreaterThan4Ml = iProvider.getLastEarthquakes(4.0);

	// reads last ten earthquakes greater than 4.0 (Ml)
	Vector<EarthquakeInfo> lastTenGreaterThan4Ml = iProvider.getLastEarthquakes(10, 4.0);

	for (EarthquakeInfo iInfo : lastTenGreaterThan4Ml) {
		System.out.println(iInfo.toString());
	}

} catch (ReadEarthquakeException e) {
	System.out.println("can not read earthquake information");
	e.printStackTrace();
} catch (ParseEarthquakeException e) {
	System.out.println("can not parse earthquake information");
	e.printStackTrace();
}

Related Skills

View on GitHub
GitHub Stars8
CategoryEducation
Updated4y ago
Forks1

Languages

Java

Security Score

70/100

Audited on Mar 15, 2022

No findings