Weather app API doesn't return icon url

So when I last checked my code about a week ago, everything worked fine. Today I was planning on getting back to the project and finishing it up by adding some better design to the way the page is organised, but I found the icons aren’t working. So I checked the console, and although the api response is an object with a “weather” element that should look like this:
“weather”:[ { “id”:500, “main”:“Rain”, “description”:“light rain”, “icon”:“” } ]
, which is what I was working with a week ago and it worked fine, the api now returns an object with a “weather” element that no longer includes the “icon” element at all. It looks like this:
weather: [ { “description”: “broken clouds”, “id”: 803, “main”: “Clouds”}]
Has anyone else who’s using the freeCodeCamp api’s icons noticed a change in their weather app?

I’ve decided I’m just going to use a different set of icons as personally I don’t really like the look of the FCC api’s icons anyways. To choose the correct icon to display, I need to understand a wider range of possible api responses, specifically the values that “[0].description” can have. Can anyone help me with this? Or should I just play with the latitude/longitude values until I’ve seen enough returns.

Edit: I just found a similar forum post that answered my question, sorry I’m not great at searching the forum yet.

Why not share the post you found? It could help someone else.

1 Like

Good idea, the post I found: Weather app description range? Solved
There’s a link to a page that shows a table that matches the fcc api’s icons to the weather descriptions.

Instead of doing your own icon mapping you just could use this info

I like those icons, they seem easy to use, thanks :slight_smile: