Class: Surveygizmo::API

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

Direct Known Subclasses

Client

Instance Attribute Summary

Attributes included from Configurable

#connection_options, #endpoint, #middleware, #password, #user_agent, #username

Instance Method Summary collapse

Methods included from Request

#get, #post

Methods included from Configurable

#configure, #credentials?, keys, #reset!

Constructor Details

#initialize(options = {}) ⇒ API

Creates a new API



15
16
17
18
19
# File 'lib/surveygizmo/api.rb', line 15

def initialize(options={})
  Surveygizmo::Configurable.keys.each do |key|
    instance_variable_set(:@#{key}", options[key] || Surveygizmo.instance_variable_get(:@#{key}"))
  end
end