Sha256: 12d17b241b0a0f2f4037c112d711d643e20ee94ca1e2e3e5ac72fe0fb0c0c260
Contents?: true
Size: 621 Bytes
Versions: 25
Compression:
Stored size: 621 Bytes
Contents
# frozen_string_literal: true module Mihari class TheHive class Alert < Base # @return [Array] def list(range: "all", sort: "-date") alerts = api.alert.search({ source: "mihari" }, range: range, sort: sort) alerts.sort_by { |alert| -alert.dig("createdAt") } end # @return [Hash] def create(title:, description:, artifacts:, tags: []) api.alert.create( title: title, description: description, artifacts: artifacts, tags: tags, type: "external", source: "mihari" ) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems