def hws_host ENV['HWS_HOST'] || 'localhost:9000' end def api_no_auth api = HelixWebServices::DefaultApi.new api.api_client.config.host = hws_host api end def api_as_jdoe api = HelixWebServices::DefaultApi.new api.api_client.config.host = hws_host login_request = HelixWebServices::LoginRequest.new(:user => 'jdoe', :password => 'johndoe1A!') login_response = api.login_post(login_request) api.api_client.config.api_key['Authorization'] = login_response.ticket api end def api_as_super api = HelixWebServices::DefaultApi.new api.api_client.config.host = hws_host login_request = HelixWebServices::LoginRequest.new(:user => 'super', :password => 'superuser1A!') login_response = api.login_post(login_request) api.api_client.config.api_key['Authorization'] = login_response.ticket api end