Class: Skykick::API

Inherits:
Object
  • Object
show all
Includes:
Authentication, Connection, WrAPI::Authentication, WrAPI::Request
Defined in:
lib/skykick/api.rb

Direct Known Subclasses

Client

Instance Method Summary collapse

Methods included from Authentication

#auth_token

Methods included from Connection

#setup_headers, #setup_logger_filtering

Constructor Details

#initialize(options = {}) ⇒ API

Creates a new API and copies settings from singleton



12
13
14
15
16
17
# File 'lib/skykick/api.rb', line 12

def initialize(options = {})
  options = Skykick.options.merge(options)
  WrAPI::Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Method Details

#configObject



19
20
21
22
23
24
25
# File 'lib/skykick/api.rb', line 19

def config
  conf = {}
  WrAPI::Configuration::VALID_OPTIONS_KEYS.each do |key|
    conf[key] = send key
  end
  conf
end