Sha256: f73a53ed70c7b8d9e71f9b544b8a093ed9f8505ec9d1d5c78d1527d1598d8fba
Contents?: true
Size: 479 Bytes
Versions: 5
Compression:
Stored size: 479 Bytes
Contents
class Sysdig::GetAlerts < Sysdig::Request def real(from: nil, to: nil) params = {} if from params.merge!(from.to_i * 1_000_000) end if to params.merge!(to.to_i * 1_000_000) end service.request( :method => :get, :path => "/api/alerts", :params => params, ) end def mock(from: nil, to: nil) alerts = service.data[:alerts].values service.response( :body => { "alerts" => alerts }, ) end end
Version data entries
5 entries across 5 versions & 1 rubygems