tsia. since the location function is broken most of the time, have a function to lookup ICAO code for a given airport. Could search airports.db.
Presently, if there's an error when accessing Google's API, the bot returns "Location not found." Instead, it should check to see if the location's name is already present in airports.db, and use those coördinates for the forecast lookup.
E.g., user calls for forecast at Des Moines, wx des moines, but Google API call fails, so then search airports.db for des moines, finding 3729,"Des Moines Intl","Des Moines","United States","DSM","KDSM",41.533972,-93.663083,958,-6,"A" and passing those coörds on to forecast.io.
tsia. since the location function is broken most of the time, have a function to lookup ICAO code for a given airport. Could search airports.db.Presently, if there's an error when accessing Google's API, the bot returns "Location not found." Instead, it should check to see if the location's name is already present in airports.db, and use those coördinates for the forecast lookup.
E.g., user calls for forecast at Des Moines,
wx des moines
, but Google API call fails, so then search airports.db fordes moines
, finding3729,"Des Moines Intl","Des Moines","United States","DSM","KDSM",41.533972,-93.663083,958,-6,"A"
and passing those coörds on to forecast.io.