Class: Formi9::API

Inherits:
Object
  • Object
show all
Includes:
Connection, OAuth, Request
Defined in:
lib/formi9/api.rb

Direct Known Subclasses

Client

Instance Method Summary collapse

Methods included from OAuth

#access_token, #access_token_cache_key, #reset_token, #token_cache_duration

Methods included from Request

#delete, #get, #post, #put, #request

Constructor Details

#initialize(options = {}) ⇒ API

Creates a new API



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

def initialize(options={})
  options = Formi9.options.merge(options)
  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/formi9/api.rb', line 19

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