Enviso

This gem works as a simple Ruby wrapper for the Enviso API. The Enviso API has a very straight forward REST API.

All this gem does, is make it a little bit simpler to use the API:

  • You can set your credentials via Rails config
  • Authrization keys are renewed/requested automatically
  • You can make REST requests right away, without having to worry about authentication

Installation

Add this line to your application's Gemfile:

gem 'enviso'

And then execute:

$ bundle

Or install it yourself as:

$ gem install enviso

Configuration

First, obtain an API key and shared secret from Enviso. Set it up like this:

Enviso::Config.api_key      = "MY-API-KEY"
Enviso::Config.api_secret   = "MY-API-SHARED-SECRET" # pubic key
Enviso::Config.tenant_key   = "TENANT-KEY"
Enviso::Config.verbose      = false # set 'true' to show raw API input/output
Enviso::Config.api_link     = "https://api.staging-enviso.io/resellingapi/"
Enviso::Config.api_version  = 1 

To use this gem in a Rails project:

# config/development.rb
config.enviso.api_key      = "MY-API-KEY"
config.enviso.api_secret   = "MY-API-SHARED-SECRET" # pubic key
config.enviso.tenant_key   = "TENANT-KEY"
config.enviso.verbose      = false # set 'true' to show raw API input/output
config.enviso.api_link     = "https://api.staging-enviso.io/resellingapi/"
config.enviso.api_version  = 1 

Usage

All there is left is to use the API according to the documentation:

Enviso::API.send_request(type: :get, endpoint: "venues/84/offers")
# => Returns Hash from JSON response

Code of Conduct

Everyone interacting in the Enviso project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.