Module: OBarc

Extended by:
OBarc
Included in:
OBarc
Defined in:
lib/obarc.rb,
lib/obarc/api.rb,
lib/obarc/version.rb,
lib/obarc/session.rb,
lib/obarc/utils/helper.rb,
lib/obarc/utils/exceptions.rb

Defined Under Namespace

Modules: Api, Utils Classes: Session

Constant Summary collapse

VERSION =
'0.5.0'

Instance Method Summary collapse

Instance Method Details

#login!(options) ⇒ Object


10
11
12
13
# File 'lib/obarc.rb', line 10

def login!(options)
  options[:base_url] ||= "#{options[:protocol]}://#{options[:server_host]}:#{options[:server_port]}/api/#{options[:api_version]}"
  Session.new(username: options[:username], password: options[:password], cookies: Api.(options).cookies)
end