Giter VIP home page Giter VIP logo

eskomsepushapi_todatabase's Introduction

EskomSePush API to Database

Description

This 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).

Usage

The 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.

API interactivity

  • GetStatus: Retrieve the current and next loadshedding statuses for South Africa and (Optional) municipal overrides
  • AreaSearch: Search area based on text - Pass in an area search text as a parameter
  • GetAreaInformation: Retreive details needed to monitor upcoming loadshedding events for the chosen suburb - pass in the Area ID retrieved from AreaSearch
  • CheckAllowance: Check allowance allocated for token

Load schedule data to database

  • 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

Try it out

The 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. Add your Database Connection string, and ESP Licence to the settings

Use API Interactions it in your own Linx solution

Copy the relevant function along with its types folder to your solution and call it from anywhere. Note that you will need to create a setting for the ESPLisence and ESPURI.

Notes

You need an EskomSePush API Subscription, obtain one from this site

Contributing

For questions, please ask the Linx community

License

MIT

eskomsepushapi_todatabase's People

Contributors

shantoiet57 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.