Sha256: cb05e8ebac4a8dc01c97c0cb407dbde12861ad429196788a8eacd3c5cf540e91
Contents?: true
Size: 697 Bytes
Versions: 20
Compression:
Stored size: 697 Bytes
Contents
# frozen_string_literal: true module Mihari module Clients class MISP < Base # # @param [String] base_url # @param [String, nil] api_key # @param [Hash] headers # def initialize(base_url, api_key:, headers: {}) raise(ArgumentError, "'api_key' argument is required") unless api_key headers["authorization"] = api_key headers["accept"] = "application/json" super(base_url, headers: headers) end # # @param [Hash] payload # # @return [Hash] # def create_event(payload) res = post("/events/add", json: payload) JSON.parse(res.body.to_s) end end end end
Version data entries
20 entries across 20 versions & 1 rubygems