RadhiyaJabed / Weather-App-API-website

weather forecast website using the openweathermap api
0 stars 0 forks source link

Program needs to accurately detect cities that aren't in the uk too. #3

Open RadhiyaJabed opened 2 years ago

RadhiyaJabed commented 2 years ago

Initially specifying GB was good, as the country code, because there are multiple cities in the world with the same name so the website wasn't sourcing the correct data. But the code needs to be able to get the info for any country. Might need to use another API for this for country codes.

RadhiyaJabed commented 2 years ago

restcountries looks like an okay api. From a quick check it looks okay. i'd have to handle the cases of the uk, being called britain, great britain or england, scotland, wales, ireland etc. Also, things like isle of man having their own country code. I could do a generic search through the original weather api and then if I'm able to detect multiple cities with the same name perhaps, then redo the search but now asking for the country name. This could be inconvenient for the user maybe.