Commit Graph

12 Commits

Author SHA1 Message Date
raul faad6a72fb Add requesting weather from individual days 2024-05-21 09:22:19 +02:00
raul e0a8c745d5 Fix JSON unmarshalling breaking on XML arrays being rendered as objects
Due to a problem in the upstream goxml2json repo, I had to switch to a
fork that allowed me to specify which children should be forcefully
rendered as arrays, as some in some instances the AEMET's XML would
contain completely individual values that are usually arrays, resulting
in the JSON translator interpreting them as objects instead of arrays.

The amount of effort I had to put into fixing this problem was
mind-boggling.
2024-05-15 12:27:24 +02:00
raul e70106932d Use dictionaries for requesting locality weather
This is the first time in my life I've found a practical use for
dictionaries myself
2024-05-15 08:35:00 +02:00
raul 281e194bc5 Expand struct and remove client() 2024-05-15 08:00:18 +02:00
raul bb2a3adb83 Expand JSON struct 2024-05-13 08:26:11 +02:00
raul 4336c0068b Properly handle unmarshalling errors 2024-05-09 10:07:00 +02:00
raul 212462be3d Communicate upstream errors to client 2024-05-08 11:14:30 +02:00
raul cc49c07b1b Improve error handling and include User-Agent 2024-05-08 11:14:11 +02:00
raul 53e4b1acf9 Fix gin only listening on localhost 2024-05-08 10:47:41 +02:00
raul 6354a824f9 Properly render JSON 2024-05-08 09:29:58 +02:00
raul 8e04491386 Add basic server functionality 2024-05-08 09:16:05 +02:00
raul 08fb32b4b2 Transition project to Cobra 2024-05-08 09:08:36 +02:00