Module: RemoteEventDataService

Includes:
ResponseDataHelper
Included in:
DataServiceAutoLoader
Defined in:
lib/metasploit/framework/data_service/remote/http/remote_event_data_service.rb

Constant Summary collapse

EVENT_API_PATH =
'/api/v1/events'
EVENT_MDM_CLASS =
'Mdm::Event'

Instance Method Summary collapse

Methods included from ResponseDataHelper

#json_to_hash, #json_to_mdm_object, #process_file, #to_ar

Instance Method Details

#events(opts) ⇒ Object



9
10
11
12
# File 'lib/metasploit/framework/data_service/remote/http/remote_event_data_service.rb', line 9

def events(opts)
  path = get_path_select(opts, EVENT_API_PATH)
  json_to_mdm_object(self.get_data(path, nil, opts), EVENT_MDM_CLASS)
end

#report_event(opts) ⇒ Object



14
15
16
# File 'lib/metasploit/framework/data_service/remote/http/remote_event_data_service.rb', line 14

def report_event(opts)
  self.post_data_async(EVENT_API_PATH, opts)
end