Introduction

The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our Implementation Guide for more details on how to implement Dyspatch.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2018.08
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen For more information, please visit https://docs.dyspatch.io

Installation

Build a gem

To build the Ruby code into a gem:

gem build dyspatch_client.gemspec

Then either install the gem locally:

gem install ./dyspatch_client-1.0.0.gem

(for development, run gem install --dev ./dyspatch_client-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'dyspatch_client', '~> 1.0.0'

Install from Ruby Gem

This is the preferred method to install the Dyspatch API Client.

gem install dyspatch-ruby

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'dyspatch_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'dyspatch_client'

# Setup authorization
DyspatchClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = DyspatchClient::LocalizationsApi.new

localization_id = "localization_id_example" # String | A localization ID

accept = "accept_example" # String | A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"


begin
  #Get Localization Object by ID
  result = api_instance.localizations_localization_id_get(localization_id, accept)
  p result
rescue DyspatchClient::ApiError => e
  puts "Exception when calling LocalizationsApi->localizations_localization_id_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.dyspatch.io

Class Method HTTP request Description
DyspatchClient::LocalizationsApi localizations_localization_id_get GET /localizations/localizationId Get Localization Object by ID
DyspatchClient::TemplatesApi templates_get GET /templates List Templates
DyspatchClient::TemplatesApi templates_template_id_get GET /templates/templateId Get Template by ID

Documentation for Models

Documentation for Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header