Sha256: 7bb37a139c821bf0d8ae39772a2ac686c84766481710b24d52c21e96d36bcecb

Contents?: true

Size: 850 Bytes

Versions: 1

Compression:

Stored size: 850 Bytes

Contents

# frozen_string_literal: true

module VirusTotal
  module Client
    class Intelligence < Base
      #
      # Intelligense search
      #
      # @param [String] query Search query
      # @param [String, nil] order Sort order
      # @param [Integer, nil] limit Maximum number of results
      # @param [String, nil] cursor Continuation cursor
      # @param [Boolean, nil] descriptors_only Whether to return full object information or just object descriptors
      #
      # @return [Hash]
      #
      def search(query, order: nil, limit: nil, cursor: nil, descriptors_only: nil)
        params = {
          query: query,
          order: order,
          limit: limit,
          cursor: cursor,
          descriptors_only: descriptors_only
        }.compact

        _get("/#{name}/search", params) { |json| json }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
virustotalx-1.2.0 lib/virustotal/clients/intelligence.rb