mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-31 19:26:27 +02:00
Update earthquakes.ps1
This commit is contained in:
parent
d66a10c6a2
commit
a9666f482a
@ -7,12 +7,12 @@
|
||||
# License: CC0
|
||||
|
||||
$Format="csv" # csv, geojson, kml, text, xml
|
||||
$Order="time" # time, time-asc, magnitude, magnitude-asc
|
||||
$MinMagnitude=6.0
|
||||
$OrderBy="time" # time, time-asc, magnitude, magnitude-asc
|
||||
|
||||
try {
|
||||
Write-Progress "Querying earthquakes for the last 30 days ..."
|
||||
(Invoke-WebRequest -Uri "https://earthquake.usgs.gov/fdsnws/event/1/query?format=$Format&orderby=$Order&minmagnitude=$MinMagnitude" -UserAgent "curl" ).Content
|
||||
(Invoke-WebRequest -Uri "https://earthquake.usgs.gov/fdsnws/event/1/query?format=$Format&minmagnitude=$MinMagnitude&orderby=$OrderBy" -UserAgent "curl" ).Content
|
||||
exit 0
|
||||
} catch {
|
||||
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user