Update list-coffee-prices.ps1

This commit is contained in:
Markus Fleschutz 2023-09-19 15:52:46 +02:00
parent 86f447985e
commit 5b2a69b336

View File

@ -33,7 +33,10 @@ function WriteHorizontalBar { param([float]$Value, [float]$Max)
}
try {
Write-Progress "⏳ Loading data from www.alphavantage.co..."
$prices = (Invoke-WebRequest -URI "https://www.alphavantage.co/query?function=COFFEE&interval=monthly&apikey=demo" -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json
Write-Progress -completed " "
""
"$($prices.name) (by alphavantage.co, in $($prices.unit))"
"---------------------------------------------------------------"