module Synthetics

Top level gem namespace.

Application level constants.

This file contains version information for the gem.

Constants

API_HOST
API_KEY_ENVIRONMENT_VARIABLE
API_PATH_PREFIX
ClientError

Raised when there is a 400 level error returned from the Synthetics API.

Error

Catch-all error class.

NoAPIKeyError

Raised when no API is given to a Synthetics client.

ParseError

Raised when parsing JSON fails.

ServerError

Raised when there is a 500 level error returned from the Synthetics API.

VERSION

Public Class Methods

new(api_key = ENV[API_KEY_ENVIRONMENT_VARIABLE]) click to toggle source
# File lib/synthetics.rb, line 14
def self.new(api_key = ENV[API_KEY_ENVIRONMENT_VARIABLE])
  if api_key.nil?
    fail NoAPIKeyError,
         "No API key given, please set $#{API_KEY_ENVIRONMENT_VARIABLE}"
  end
  API.new(Client.new(api_key))
end