Reputation: 1646
In Weather project I have all the information required to display current and forecast weather data from Accuweather API, but, the main reuirement is to display weather icons corresponding to weather condtion which is displayed as WeatherIcon number in console. How to extract that icon?
Weather api when consoled
console.log('DATA IN HOURLYFORECAST', data)
DateTime: "2020-02-03T20:00:00+05:30"
EpochDateTime: 1580740200
WeatherIcon: 36
IconPhrase: "Intermittent clouds"
HasPrecipitation: false
IsDaylight: false
Temperature: {Value: 76, Unit: "F", UnitType: 18}
RealFeelTemperature: {Value: 76, Unit: "F", UnitType: 18}
As seen above for the weather icon api link is not given, only digit is shown. Any possible solution?
Upvotes: 3
Views: 5047
Reputation: 21
They have clearly mentioned that
Note: Please do not link directly to these images from your applications. The URLs can and will change.
reference - https://apidev.accuweather.com/developers/weatherIcons
Current possible solution is to add images locally into your application, map them with icon number (coming from accuweather api response) and show onto the application UI
Upvotes: 2