Method: Strutta::API#initialize
- Defined in:
- lib/strutta-api.rb
#initialize(token, host = 'http://strutta-api.herokuapp.com/', path = Version::VERSION_PATH) ⇒ Strutta::API
Initializes the Strutta API wrapper
29 30 31 32 33 34 35 36 37 |
# File 'lib/strutta-api.rb', line 29 def initialize(token, host = 'http://strutta-api.herokuapp.com/', path = Version::VERSION_PATH) fail Error, 'You must provide a Strutta API key' unless token @host = host @path = path @token = token @session = Excon.new @host @debug = debug end |