For some locations Yr API returns additional information, like night for example. This happens as the label Partlycloudy_nigh represents in the returned json payload the name of the status icon.
It would be nice to implement a function that trims down the suffix. Other approach may be to check all possible suffix values Yr returns, and to create a custom mapping between returned values from Yr API and Meteo API. meteo could use this mapping to change weather description returned from its API.
Example current output:
0.61s Location: Berlin,DE, Weather: Partlycloudy_night 3.8°C
Expected:
0.61s Location: Berlin,DE, Weather: Partlycloudy 3.8°C
For some locations Yr API returns additional information, like
nightfor example. This happens as the labelPartlycloudy_nighrepresents in the returned json payload the name of the status icon.It would be nice to implement a function that trims down the suffix. Other approach may be to check all possible suffix values Yr returns, and to create a custom mapping between returned values from Yr API and Meteo API.
meteocould use this mapping to change weather description returned from its API.Example current output:
Expected: