Skip to content

weather/dwd: Simplify API calls

Ismael Asensio requested to merge work/iasensio/dwd-simplify-api-requests into master

Reason for the change

Use a common method to request data from the API, reducing the amount of boilerplate and duplicated code. Also store the data using a shared pointer, which saves unnecesary copies and makes it simpler to avoid a data leak on certain codepaths

This also makes it simpler to eventually extract out common code between weather providers, as the common method is shared with bbcukmet and partially with noaa.

Test plan

Pure refactor MR. The weather widget should work as before

Merge request reports

Loading