Good night everyone!
Right now I’m trying to complete the “Local Weather” project. FCC Weather API documentation states that the server’s response should include links to icons showing the relevant weather condition. However, I get this…
{
"coord": {
"lon": -6.26,
"lat": 53.37
},
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain"
},
{
"id": 300,
"main": "Drizzle",
"description": "light intensity drizzle",
"icon": "09n"
}
],
"base": "stations",
"main": {
"temp": 11.43,
"pressure": 983,
"humidity": 87,
"temp_min": 11,
"temp_max": 12
},
"visibility": 10000,
"wind": {
"speed": 11.8,
"deg": 250
},
"clouds": {
"all": 75
},
"dt": 1505086200,
"sys": {
"type": 1,
"id": 5237,
"message": 0.0048,
"country": "IE",
"sunrise": 1505109115,
"sunset": 1505155810
},
"id": 6691027,
"name": "Drumcondra",
"cod": 200
}
As you can see, there is no weather[0].icon, and weather[1].icon contains only “09n” instead of a valid URL.
It seems the API is broken in the sense that it doesn’t match its own documentation.
It would also be nice to have a list of all available conditions (like Rain, Clouds, Clear) etc, so I would be able to use a set of my own icons (but it would be rather difficult because you can’t host you own images with CodePen, and the images must be available via HTTPS in order for geolocation functions to work.