class AppsecFlowImport::Client
Attributes
api_key[R]
base_url[R]
Public Class Methods
new(api_key, environment)
click to toggle source
# File lib/appsec_flow_import/client.rb, line 5 def initialize(api_key, environment) @api_key = api_key load_base_url_for(environment) end
Public Instance Methods
vulnerabilities()
click to toggle source
# File lib/appsec_flow_import/client.rb, line 10 def vulnerabilities AppsecFlowImport::Vulnerability.new(self) end
Private Instance Methods
load_base_url_for(environment)
click to toggle source
# File lib/appsec_flow_import/client.rb, line 16 def load_base_url_for(environment) case environment when 'on_premise' @base_url = 'https://localhost' when 'localhost' @base_url = 'http://localhost:3000' when 'production' @base_url = 'https://app.conviso.com.br' when 'staging' @base_url = 'https://homologa.conviso.com.br' else raise ArgumentError, "environment must be 'production' or 'staging'" end end