Sha256: 6b0f4bdfe3c9759a1eed9cb98151977da43ae59069cf7094e9c84b1c27057431

Contents?: true

Size: 562 Bytes

Versions: 2

Compression:

Stored size: 562 Bytes

Contents

# frozen_string_literal: true

module Shodan
  module Clients
    class Alert < Base
      def create(name:, ip:)
        params = {
          name: name,
          filters: {
            ip: ip
          }
        }
        post("/shodan/alert", params)
      end

      def delete_by_id(id)
        delete("/shodan/alert/#{id}")
      end

      def get_by_id(id)
        get("/shodan/alert/#{id}/info")
      end

      def info
        get("/shodan/alert/info")
      end

      def triggers
        get("/shodan/alert/triggers")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shodanx-0.2.0 lib/shodan/clients/alert.rb
shodanx-0.1.0 lib/shodan/clients/alert.rb