okierazorback / usgs
This package is abandoned and no longer maintained.
No replacement package was suggested.
A wrapper for a better USGS api.
2.0.1
2017-01-10 01:03 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~6.2
- nesbot/carbon: ~1.21
This package is not auto-updated.
Last update: 2020-01-26 00:53:21 UTC
README
A wrapper for the USGS API
This is a wrapper for the USGS API.
A few examples
Get all 2.5 magnitude or greater quakes in the last hour
$earthQuake= new EarthQuake(new \GuzzleHttp\Client());
$quakes = $quake->getLastHour(2.5);
Get all 2.5 magnitude or greater quakes in the last 24 hours
$earthQuake= new EarthQuake(new \GuzzleHttp\Client());
$quakes = $quake->getLastTwentyFour(2.5);
Get all 2.5 magnitude or greater quakes in the last 30 days
$earthQuake= new EarthQuake(new \GuzzleHttp\Client());
$quakes = $quake->getLastThirtyDays(2.5);
Or build your own!
$earthQuake= new EarthQuake(new \GuzzleHttp\Client());
$quakes = $earthQuake
->setParams([
'format' => 'geojson',
'starttime' => Carbon::now('UTC')->subDays(30)->toIso8601String(),
'endtime' => Carbon::now('UTC')->toIso8601String(),
'minmagnitude' => 4
])
->getQuakes();