You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result is a JSON array of all loadshedding since 2023-05-17T20:00:00. I'm not sure what's special about that date, maybe it's when the API was set up? Here's a snippet
Together, these endpoints could fully automate Cape Town's loadshedding via the GitHub API. This should definitely be done, and it seems like the cape town twitter feed gets manually updated based on data from the website, so the website is a better source of truth.
There's a slight problem in that there's no constant URL to historical data, so old schedules won't have any way to be verified. It's possible that this can be fixed by using the waybackmachine if they've got an API that allows programmatic saving of webpages, and then the "source" can be a web archive link. SO post 1 . SO post 2. Web archive API docs. Example saved page.
The text was updated successfully, but these errors were encountered:
Turns out, the cape town website's loadshedding page has an API that can be queried without needing an API key, like so:
The result is a JSON array of all loadshedding since 2023-05-17T20:00:00. I'm not sure what's special about that date, maybe it's when the API was set up? Here's a snippet
There's also this endpoint which can be used to check when the schedule was last updated:
Together, these endpoints could fully automate Cape Town's loadshedding via the GitHub API. This should definitely be done, and it seems like the cape town twitter feed gets manually updated based on data from the website, so the website is a better source of truth.
There's a slight problem in that there's no constant URL to historical data, so old schedules won't have any way to be verified. It's possible that this can be fixed by using the waybackmachine if they've got an API that allows programmatic saving of webpages, and then the "source" can be a web archive link. SO post 1
. SO post 2. Web archive API docs. Example saved page.
The text was updated successfully, but these errors were encountered: