Exporting & appending information from web API to CSV
So I've been working on trying to build a CSV file that pings an API daily & builds a CSV file with a new line every day. Having some trouble though, I got everything set up how I think it should, but it doesn't actually get the values I select, it just writes a CSV with headers. Even if I just run the first 4 lines, no values.
I'm brand new to PowerShell so any help would be appreciated, code here:
$request = 'https://api.coinmarketcap.com/v1/ticker/dogecoin/'
Invoke-WebRequest $request |
ConvertFrom-Json |
Select symbol,price_usd,last_updated |
Export-Csv -Path "test.csv" -Encoding ASCII -NoTypeInformation -append
Posted Jun 3, 2017, 5:58 PM UTC
113