|
|
|
|
|
by jerf
5085 days ago
|
|
todsul beat me to it (good show!), but in the spirit of teaching a person to fish: for airport in JFK GEO TXL SXF AGA LGW LTN SAW IKA KUL PER BKK KBP; do
curl "http://airportcode.riobard.com/airport/$airport?fmt=JSON";
echo;
sleep 1;
done
Semicolons are present because I did this in one line, left so you can too. Linebreaks are for HN convenience only. echo is because curl doesn't add linefeeds, sleep 1 is to be polite. |
|
I haven't maintained that service for a long time, and I've got a dozen or so emails suggesting ways to improve the API. I'm not sure what I should do with it, given that the data is really scrapped from Wikipedia and pretty hard to keep it up-to-date. Any suggestions?