Closed giorgioriccardi closed 2 years ago
The endpoint has changed to: https://apps.qedsystems.ca/weather/getTides?location_name=
I've removed the height in metres, but can add it back in. I figured that it was an easy conversion (multiply by 0.3048) so providing both was redundant.
Valid tide stations can be found here: https://apps.qedsystems.ca/weather/getTideStations
I've moved the code to a public GitHub repos: https://github.com/bferguso/homeauto-common_server (dao that scrapes the Wx Canada Site) https://github.com/bferguso/homeauto-public_server (Python / Flask app)
The API Endpoint clarifications fixes the issue. Closing the issue
https://github.com/enejb/bowen.today/blob/b23ce889f9ee0724842d1e6b41fa74c4d05fa7e7/lib/weather/tide.php#L14
replacing the previous endpoint with https://apps.qedsystems.ca/weather/custom?conditions=%5B%5D&forecasts=%5B%22HOWE_SOUND%22%5D&tides=%5B%22GIBSONS%22%5D returns proper Object[]:
tide_entries: Array(24) [ {…}, {…}, {…}, … ] 0: Object { time: "2021-10-23T00:37:00", height_m: "1.1", height_ft: "3.7" } height_ft: "3.7" height_m: "1.1" time: "2021-10-23T00:37:00"