Sha256: 29ca816831e40fe3768797560768ec7a1020ab11171e7f4272e435e233aa2611

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

module Onyphe
  module Clients
    class Alert < Client
      def list
        get("/alert/list") { |json| json }
      end

      def add(name:, query:, email:)
        params = {
          name: name,
          query: query,
          email: email
        }
        post("/alert/add", params) { |json| json }
      end

      def delete(id)
        post("/alert/del/#{id}") { |json| json }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onyphe-2.0.0 lib/onyphe/clients/alert.rb