Sha256: b578279467cf23831fa5e84eb0ccb55f448eacbb5a49ae7ab155e520bf488502

Contents?: true

Size: 716 Bytes

Versions: 1

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

module Spyse
  module Client
    class CVE < Base
      #
      # Lists CVE
      #
      # @see https://spyse.com/api#/cve/cve
      #
      # @param [String] cve_id MITRE CVE unique identifier.
      #
      # @return [Hash]
      #
      def get(cve_id)
        _get("/cve/#{cve_id}") { |json| json }
      end

      #
      # Lists CVEs
      #
      # @see https://spyse.com/api#/cve/cve_search
      #
      # @return [Hash]
      #
      def search(search_params, limit: nil, offset: nil)
        params = {
          search_params: search_params, limit: limit, offset: offset,
        }.compact
        _post("/cve/search", params) { |json| json }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spysex-0.2.0 lib/spyse/clients/cve.rb