module BWAPI::Client::CommandCenter::Displays::Events

Displays module for commandcenter/displays/events endpoints

Public Instance Methods

create_event(display_id, opts = {}) click to toggle source

Create a new display event

@param [Integer] display_id The display id @param opts [Hash] options hash of parameters @option opts [Integer] id The event id @option opts [String] name The event name @option opts [String] description The event description @option opts [Integer] displayId The display id @option opts [Boolean] matched Events rules matched @option opts [Integer] queryId Reference query id @option opts [Integer] threshold Event mention volume threshold @option opts [Hash] action Event action @option opts [String] created Date event created @option opts [Boolean] enabled Whether event is enabled @option opts [Hash] filters Event filter options @return [Hash] New display event

# File lib/bwapi/client/command_center/displays/events.rb, line 40
def create_event(display_id, opts = {})
  post "commandcenter/displays/#{display_id}/events", opts
end
delete_event(display_id, event_id) click to toggle source

Delete an existing display event

@param [Integer] display_id The display id @param [Integer] event_id The event id @return [Hash] Deleted display event

# File lib/bwapi/client/command_center/displays/events.rb, line 69
def delete_event(display_id, event_id)
  delete "commandcenter/displays/#{display_id}/events/#{event_id}"
end
events(display_id) click to toggle source

Get the events for an existing display

@param [Integer] display_id The display id @return [Hash] All events for display

# File lib/bwapi/client/command_center/displays/events.rb, line 11
def events(display_id)
  get "commandcenter/displays/#{display_id}/events"
end
get_event(display_id, event_id) click to toggle source

Get an existing display event

@param [Integer] display_id The display id @param [Integer] event_id The event id @return [Hash] Specific event for display

# File lib/bwapi/client/command_center/displays/events.rb, line 20
def get_event(display_id, event_id)
  get "commandcenter/displays/#{display_id}/events/#{event_id}"
end
update_event(display_id, event_id, opts = {}) click to toggle source

Update an existing display event

@param [Integer] display_id The display id @param opts [Hash] options hash of parameters @option opts [Integer] id The event id @option opts [String] name The event name @option opts [String] description The event description @option opts [Integer] displayId The display id @option opts [Boolean] matched Events rules matched @option opts [Integer] queryId Reference query id @option opts [Integer] threshold Event mention volume threshold @option opts [Hash] action Event action @option opts [String] created Date event created @option opts [Boolean] enabled Whether event is enabled @option opts [Hash] filters Event filter options @return [Hash] Updated display event

# File lib/bwapi/client/command_center/displays/events.rb, line 60
def update_event(display_id, event_id, opts = {})
  put "commandcenter/displays/#{display_id}/events/#{event_id}", opts
end