Sha256: 33f0f13c2692f52b5772c8f85cbcce1eb151f62aa5dd70abc01e632832143769
Contents?: true
Size: 755 Bytes
Versions: 19
Compression:
Stored size: 755 Bytes
Contents
# frozen_string_literal: true module Mihari module Clients # # MISP API client # class MISP < Base # # @param [String] base_url # @param [String, nil] api_key # @param [Hash] headers # @param [Integer, nil] timeout # def initialize(base_url, api_key:, headers: {}, timeout: nil) raise(ArgumentError, "api_key is required") unless api_key headers["authorization"] = api_key headers["accept"] = "application/json" super(base_url, headers: headers, timeout: timeout) end # # @param [Hash] payload # # @return [Hash] # def create_event(payload) post_json("/events/add", json: payload) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems