The project is in a healthy, maintained state
EskomSePush API Wrapper Rubygem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.7.7
 Project Readme

eskomsepush_ruby API Wrapper

Tests

A Ruby wrapper for the EskomSePush API V2. This gem provides a simple and intuitive interface to interact with the EskomSePush services.

Important Notice

Users of this library are bound by the terms in the EskomSePush's license agreement. Please review their terms of service before using this gem.

Installation

Add this line to your application's Gemfile:

gem 'eskom_se_push_ruby'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install eskom_se_push_ruby

Usage

Configuration

esp = EskomSePush.client('your-api-key')

Examples

# Example of checking your quota
quota = esp.quota.allowance
puts quota

area_schedule = esp.area_information('area_id')
puts area_schedule

Error Handling

This gem will raise specific errors for different API responses:

  • YourGemName::BadRequestError - HTTP 400
  • YourGemName::AuthenticationError - HTTP 403
  • YourGemName::NotFoundError - HTTP 404
  • YourGemName::RequestTimeoutError - HTTP 408
  • YourGemName::RateLimitError - HTTP 429
  • YourGemName::ServerError - HTTP 500-599
  • YourGemName::UnexpectedError - Other errors

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/stiaannel/eskomsepush_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in this project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.