Created
December 21, 2022 17:20
-
-
Save jmhale/777a065861f46df9b205811a48b1b4f0 to your computer and use it in GitHub Desktop.
METAR/TAR Functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Functions to get METAR/TAFs from checkwx.com. Defaults to KDCA for both. | |
function metar() { | |
if [ "$1" != "" ] | |
then | |
curl "https://api.checkwx.com/bot/metar/$1?x-api-key=$CHECK_WX_API_KEY" | |
else | |
curl "https://api.checkwx.com/bot/metar/KDCA?x-api-key=$CHECK_WX_API_KEY" | |
fi | |
} | |
function taf() { | |
if [ "$1" != "" ] | |
then | |
curl "https://api.checkwx.com/bot/taf/$1?x-api-key=$CHECK_WX_API_KEY" | |
else | |
curl "https://api.checkwx.com/bot/taf/KDCA?x-api-key=$CHECK_WX_API_KEY" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment