Class: Onyphe::Clients::Alert

Inherits:
Onyphe::Client show all
Defined in:
lib/onyphe/clients/alert.rb

Constant Summary

Constants inherited from Onyphe::Client

Onyphe::Client::HOST, Onyphe::Client::URL, Onyphe::Client::VERSION

Instance Method Summary collapse

Methods inherited from Onyphe::Client

#initialize

Constructor Details

This class inherits a constructor from Onyphe::Client

Instance Method Details

#add(name:, query:, email:) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/onyphe/clients/alert.rb', line 10

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

#delete(id) ⇒ Object



19
20
21
# File 'lib/onyphe/clients/alert.rb', line 19

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

#listObject



6
7
8
# File 'lib/onyphe/clients/alert.rb', line 6

def list
  get("/alert/list") { |json| json }
end