Module: Smspilot

Extended by:
Configuration
Defined in:
lib/smspilot.rb,
lib/smspilot/api.rb,
lib/smspilot/client.rb,
lib/smspilot/errors.rb,
lib/smspilot/request.rb,
lib/smspilot/version.rb,
lib/smspilot/connection.rb,
lib/smspilot/configuration.rb

Defined Under Namespace

Modules: Configuration, Connection, Error, Request Classes: Api, Client

Constant Summary collapse

VERSION =
"0.0.4"

Constants included from Configuration

Configuration::DEFAILT_API_KEY, Configuration::DEFAILT_LOGGER, Configuration::DEFAILT_LOGIN, Configuration::DEFAILT_PASSWORD, Configuration::DEFAULT_ADAPTER, Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_TIMEOUT, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.new(options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/smspilot.rb', line 9

def new options = {}
  if options.is_a? String
    Smspilot::Client.new :api_key => options
  elsif options.is_a? Hash
    Smspilot::Client.new options
  else
    raise ArgumentError
  end
end