Sha256: ae6b6469c7bfcd7ee58ecb34e4fc453fad1750ddb1c06003417005d6097295e5

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

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

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

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