diff options
author | Ben Burwell <ben@benburwell.com> | 2020-02-05 16:09:27 -0500 |
---|---|---|
committer | Ben Burwell <ben@benburwell.com> | 2020-02-05 16:09:27 -0500 |
commit | a42ca5340be6dc92a744fc19a0aa27c60b5c57ea (patch) | |
tree | a7856997f174b4a46691b20ab453b252a10d16fc /templates/.bin/taf | |
parent | 9292ff0f514eb6e17234f25a0418dc2a742c605a (diff) |
metar/taf: update avwx api
Diffstat (limited to 'templates/.bin/taf')
-rwxr-xr-x | templates/.bin/taf | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/.bin/taf b/templates/.bin/taf index 9564b95..f7047d7 100755 --- a/templates/.bin/taf +++ b/templates/.bin/taf @@ -6,6 +6,7 @@ if [[ ! -x "$jq" && -x "/usr/local/bin/jq" ]]; then fi station=$(echo -n "$1" | tr "a-z" "A-Z") -json=$(curl -s "https://avwx.rest/api/taf/${station:-KBOS}") -echo "$json" | "$jq" --raw-output '.["Raw-Report"]' 2>&1 +token=$(pass show avwx-token) +json=$(curl -s -H "Authorization: ${token}" "https://avwx.rest/api/taf/${station:-KBOS}") +echo "$json" | "$jq" --raw-output '.raw' 2>&1 |