Class: Integra365::API

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

Direct Known Subclasses

Client

Instance Method Summary collapse

Methods included from Authentication

#token, #token_refresh

Constructor Details

#initialize(options = {}) ⇒ API

Creates a new API and copies settings from singleton



11
12
13
14
15
16
# File 'lib/integra365/api.rb', line 11

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

Instance Method Details

#configObject



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

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