Skip to content

Commit

Permalink
truly proper handling of IGetCurrencies.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Beethoven-n committed Aug 21, 2020
1 parent b1bf968 commit caa38d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tf2prices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ apikey=''
curl -sX GET "https://backpack.tf/api/IGetCurrencies/v1?raw=0&key=$apikey" -H "accept: application/json" > $HOME/IGetCurrencies.json

#get prices
ref=$(cat ./IGetCurrencies.json |jq '.response.currencies.metal.price.value')
key=$(cat ./IGetCurrencies.json |jq '.response.currencies.keys.price.value')
bud=$(cat ./IGetCurrencies.json |jq '.response.currencies.earbuds.price.value')
ref=$(cat $HOME/IGetCurrencies.json |jq '.response.currencies.metal.price.value')
key=$(cat $HOME/IGetCurrencies.json |jq '.response.currencies.keys.price.value')
bud=$(cat $HOME/IGetCurrencies.json |jq '.response.currencies.earbuds.price.value')

#print prices and nice text
echo "Ref: $ref Keys: $key Buds: $bud"

0 comments on commit caa38d6

Please sign in to comment.