i have a json file on response from HTTP request and there is an image with value like
c04n
Could you help pls, how to convert that, here is the json resp.
{
"app_temp": -3.8,
"azimuth": 70.12,
"clouds": 88,
"datetime": "2022-11-20:01",
"dewpt": -5.5,
"dhi": 0,
"dni": 0,
"elev_angle": -41.23,
"ghi": 0,
"h_angle": null,
"pod": "n",
"precip": 0,
"pres": 999.6961,
"revision_status": "interim",
"rh": 86,
"slp": 1022.0282,
"snow": 0,
"solar_rad": 0,
"temp": -3.5,
"timestamp_local": "2022-11-20T03:00:00",
"timestamp_utc": "2022-11-20T01:00:00",
"ts": 1668906000,
"uv": 0,
"vis": 16,
"weather": {
"code": 804,
"icon": "c04n",
"description": "Overcast clouds"
},
"wind_dir": 153,
"wind_gust_spd": 1,
"wind_spd": 0.69
}
Im expecting i file probably which i can later pass to a view with MVC
CodePudding user response:
Search the web for "Overcast clouds icon c04n". You'll find a whole page of weatherbit.io icons.
CodePudding user response:
Icons should be found here https://raw.githubusercontent.com/ifpb/weather-forecast/master/icons/
just add [code].png
at the end.
Ex: https://raw.githubusercontent.com/ifpb/weather-forecast/master/icons/c04n.png