Sha256: a15688969620c204c9fe9b4696787b14a93e383a55818377104cf01da4a044cb

Contents?: true

Size: 997 Bytes

Versions: 2

Compression:

Stored size: 997 Bytes

Contents

require 'cgi'
require 'rubygems'
require 'xmlsimple'
require 'faraday'

module Solusvm
  class << self
    attr_accessor :api_endpoint, :api_id, :api_key, :api_options

    # Specifies the login and url for making requests
    #
    # example:
    #
    #   Solusvm.config('id', 'key', :url => 'http://www.example.com/api', :logger => RAILS_LOGGER, :logger_method => :log_info)
    #
    # Options:
    # * <tt>:logger</tt> - Log object used for logging API responses
    # * <tt>:logger_method</tt> - The method that performs the logging on the Log object
    def config(api_id, api_key, options={})
      @api_id       = api_id
      @api_key      = api_key
      @api_endpoint = URI.parse(options.delete(:url))
      @api_options  = options
    end
  end
end

require 'solusvm/exceptions'
require 'solusvm/hash'
require 'solusvm/solusvm_errors'
require 'solusvm/base'
require 'solusvm/general'
require 'solusvm/client'
require 'solusvm/server'
require 'solusvm/reseller'
require 'solusvm/node'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solusvm-1.1.0.beta2 lib/solusvm.rb
solusvm-1.1.0.beta1 lib/solusvm.rb