module AlertlogicHelper::Incidents

Incidents Helper

Public Instance Methods

get_incident_notes(customer_id, incident_id) click to toggle source

rubocop:enable MethodLength

# File lib/alertlogic_helper/incidents.rb, line 19
def get_incident_notes(customer_id, incident_id)
  incidents_url = "#{config.incident_api_url}/v2/notes?customer_id=#{customer_id}&incident_id=>#{incident_id}"
  params = {
    customer_id: config.customer_id,
    url: incidents_url
  }
  resp = api_call(params)
  parse_json(resp)
end
get_incidents(customer_id) click to toggle source

rubocop:disable LineLength

# File lib/alertlogic_helper/incidents.rb, line 8
def get_incidents(customer_id)
  incidents_url = "#{config.incident_api_url}/v3/incidents?customer_id=#{customer_id}&create_date=>#{(Time.now - (24 * 60 * 60)).to_i}"
  params = {
    customer_id: customer_id,
    url: "\"#{incidents_url}\""
  }
  resp = api_call(params)
  parse_json(resp)
end