{"id":21638474,"url":"https://github.com/linx-software/eskomsepushapi_todatabase","last_synced_at":"2026-05-20T06:05:35.890Z","repository":{"id":232220343,"uuid":"783745122","full_name":"linx-software/EskomSePushAPI_ToDatabase","owner":"linx-software","description":"Make calls to the EskomSePush API to retrieve schedule details for a specific area and then load those schedule times to a database table. This solution is made in Linx.","archived":false,"fork":false,"pushed_at":"2024-04-08T13:58:11.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T02:43:53.431Z","etag":null,"topics":["api","eskomsepush","eskomsepush-api","linx","sql"],"latest_commit_sha":null,"homepage":"https://linx.software/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linx-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-08T13:42:42.000Z","updated_at":"2024-04-08T13:59:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0cea209-88bf-4ffd-bc6a-30bab1c3bd46","html_url":"https://github.com/linx-software/EskomSePushAPI_ToDatabase","commit_stats":null,"previous_names":["linx-software/eskomsepushapi_todatabase"],"tags_count":0,"template":false,"template_full_name":"linx-software/template-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linx-software%2FEskomSePushAPI_ToDatabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linx-software%2FEskomSePushAPI_ToDatabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linx-software%2FEskomSePushAPI_ToDatabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linx-software%2FEskomSePushAPI_ToDatabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linx-software","download_url":"https://codeload.github.com/linx-software/EskomSePushAPI_ToDatabase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244333021,"owners_count":20436123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","eskomsepush","eskomsepush-api","linx","sql"],"created_at":"2024-11-25T04:09:46.798Z","updated_at":"2026-05-20T06:05:35.860Z","avatar_url":"https://github.com/linx-software.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# EskomSePush API to Database\r\n\r\n## Description\r\nThis solution shows how to interact with the EskomSePush API with Linx. The solution contains functions to interact with the API (a function for each endpoint) and then also how to write the schedule information into a database table (SQL Server).\r\n\r\n## Usage\r\nThe solution has a collection of functions to interact with the API, and a single function to load the schedule (of a specific area) to a table. There is a table creation script for the table included in this solution. \r\n\r\n#### API interactivity\r\n- GetStatus: Retrieve the current and next loadshedding statuses for South Africa and (Optional) municipal overrides\r\n- AreaSearch: Search area based on text - Pass in an area search text as a parameter\r\n- GetAreaInformation: Retreive details needed to monitor upcoming loadshedding events for the chosen suburb - pass in the Area ID retrieved from AreaSearch\r\n- CheckAllowance: Check allowance allocated for token\r\n\r\n#### Load schedule data to database\r\n- WriteToDatabase: Get the area information for a specific area ID and write it to a database table. The solution was made for a MS SQL Database but can be modified to work with any other database - Pass in the Area ID\r\n\r\n### Try it out\r\nThe table create script is included as Create Schedule Table Script.sql, create this table to load the schedule for an area with the WriteToDatabase function. \r\nAdd your Database Connection string, and ESP Licence to the settings\r\n\r\n### Use API Interactions it in your own Linx solution\r\nCopy the relevant function along with its types folder to your solution and call it from anywhere.\r\nNote that you will need to create a setting for the ESPLisence and ESPURI. \r\n\r\n### Notes\r\nYou need an EskomSePush API Subscription, obtain one from [this site](https://eskomsepush.gumroad.com/l/api)\r\n\r\n## Contributing\r\n\r\nFor questions, please ask the [Linx community](https://linx/software/community)\r\n\r\n## License\r\n\r\n[MIT](https://github.com/linx-software/template-repo/blob/main/LICENSE.txt)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinx-software%2Feskomsepushapi_todatabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinx-software%2Feskomsepushapi_todatabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinx-software%2Feskomsepushapi_todatabase/lists"}