Module: EventServlet

Defined in:
lib/msf/core/web_services/servlet/event_servlet.rb

Class Method Summary collapse

Class Method Details

.api_pathObject


3
4
5
# File 'lib/msf/core/web_services/servlet/event_servlet.rb', line 3

def self.api_path
  '/api/v1/events'
end

.api_path_with_idObject


7
8
9
# File 'lib/msf/core/web_services/servlet/event_servlet.rb', line 7

def self.api_path_with_id
  "#{EventServlet.api_path}/?:id?"
end

.registered(app) ⇒ Object


11
12
13
14
15
# File 'lib/msf/core/web_services/servlet/event_servlet.rb', line 11

def self.registered(app)
  app.get EventServlet.api_path, &get_event
  app.get EventServlet.api_path_with_id, &get_event
  app.post EventServlet.api_path, &report_event
end