module BWAPI::Client::CommandCenter::Displays::Messages

Displays module for commandcenter/displays/message endpoints

Public Instance Methods

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

Create a new display message

@param [Integer] display_id The display id @param opts [Hash] options hash of parameters @option opts [Integer] id The id of message @option opts [Integer] displayId The display id @option opts [String] title The message title @option opts [String] type The message type @option opts [String] content The message content @option opts [Integer] duration The message duration @option opts [Boolean] active Whether message is active @option opts [Boolean] enabled Whether message is enabled @option opts [Array] screenIds ScreenIds where message is shown @return [Hash] New display message

# File lib/bwapi/client/command_center/displays/messages.rb, line 38
def create_message(display_id, opts = {})
  post "commandcenter/displays/#{display_id}/message", opts
end
delete_message(display_id, message_id) click to toggle source

Delete an existing display message

@param [Integer] display_id The display id @param [Integer] message_id The message id @return [Hash] Deleted display message

# File lib/bwapi/client/command_center/displays/messages.rb, line 65
def delete_message(display_id, message_id)
  delete "commandcenter/displays/#{display_id}/message/#{message_id}"
end
get_message(display_id, message_id) click to toggle source

Get an existing display message

@param [Integer] display_id The display id @param [Integer] message_id The message id @return [Hash] Specific message for display

# File lib/bwapi/client/command_center/displays/messages.rb, line 20
def get_message(display_id, message_id)
  get "commandcenter/displays/#{display_id}/messages/#{message_id}"
end
messages(display_id) click to toggle source

Get the messages for an existing display

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

# File lib/bwapi/client/command_center/displays/messages.rb, line 11
def messages(display_id)
  get "commandcenter/displays/#{display_id}/messages"
end
update_message(display_id, message_id, opts = {}) click to toggle source

Update an existing display message

@param [Integer] display_id The display id @param opts [Hash] options hash of parameters @option opts [Integer] id The id of message @option opts [Integer] displayId The display id @option opts [String] title The message title @option opts [String] type The message type @option opts [String] content The message content @option opts [Integer] duration The message duration @option opts [Boolean] active Whether message is active @option opts [Boolean] enabled Whether message is enabled @option opts [Array] screenIds ScreenIds where message is shown @return [Hash] Updated display message

# File lib/bwapi/client/command_center/displays/messages.rb, line 56
def update_message(display_id, message_id, opts = {})
  put "commandcenter/displays/#{display_id}/message/#{message_id}", opts
end