Module: BWAPI::Client::CommandCenter::Displays

Includes:
Events, Messages, Scenes, Screens, Users
Included in:
BWAPI::Client::CommandCenter
Defined in:
lib/bwapi/client/command_center/displays.rb,
lib/bwapi/client/command_center/displays/users.rb,
lib/bwapi/client/command_center/displays/events.rb,
lib/bwapi/client/command_center/displays/scenes.rb,
lib/bwapi/client/command_center/displays/screens.rb,
lib/bwapi/client/command_center/displays/messages.rb,
lib/bwapi/client/command_center/displays/users/access.rb

Overview

Displays module for commandcenter/displays endpoints

Defined Under Namespace

Modules: Events, Messages, Scenes, Screens, Users

Instance Method Summary collapse

Methods included from Users

#delete_display_user_access_levels, #displays_access_levels, #get_display_user_access_levels, #get_display_users_access_levels, #get_displays_user_access_levels

Methods included from Users::Access

#grant_display_user_access_level, #update_display_user_access_level

Methods included from Screens

#create_screen, #delete_screen, #get_screen, #get_screen_with_scenes, #screens, #update_screen

Methods included from Scenes

#create_scene, #delete_scene, #get_scene, #get_scene_with_sub_scenes, #scenes, #update_scene

Methods included from Messages

#create_message, #delete_message, #get_message, #messages, #update_message

Methods included from Events

#create_event, #delete_event, #events, #get_event, #update_event

Instance Method Details

#create_display(opts = {}) ⇒ Hashie::Mash

Create a new display

Parameters:

  • opts (Hash) (defaults to: {}) —

    options hash of parameters

Options Hash (opts):

  • id (Integer) —

    The id of display

  • name (String) —

    The name of the display

  • options (Hash) —

    Display options

  • screenIds (Array) —

    Screen ids used to display

  • active (Boolean) —

    Whether display is active

  • created (String) —

    Date display was created

  • enabled (Boolean) —

    Whether display is enabled

Returns:

  • (Hashie::Mash) —

    New display



39
40
41
# File 'lib/bwapi/client/command_center/displays.rb', line 39

def create_display opts={}
  post "commandcenter/displays", opts
end

#delete_display(display_id) ⇒ Hashie::Mash

Delete an existing display

Parameters:

  • display_id (Integer) —

    the display id

Returns:

  • (Hashie::Mash) —

    Deleted display



63
64
65
# File 'lib/bwapi/client/command_center/displays.rb', line 63

def delete_display display_id
  delete "commandcenter/displays/#{display_id}"
end

#displays ⇒ Hashie::Mash

Get the displays visible to the user

Returns:

  • (Hashie::Mash) —

    All displays



16
17
18
# File 'lib/bwapi/client/command_center/displays.rb', line 16

def displays
  get "commandcenter/displays"
end

#get_display(display_id) ⇒ Hashie::Mash

Get an existing display

Parameters:

  • display_id (Integer) —

    the display id

Returns:

  • (Hashie::Mash) —

    Specific display



24
25
26
# File 'lib/bwapi/client/command_center/displays.rb', line 24

def get_display display_id
  get "commandcenter/displays/#{display_id}"
end

#update_display(display_id, opts = {}) ⇒ Hashie::Mash

Update an existing display

Parameters:

  • display_id (Integer) —

    the display id

  • opts (Hash) (defaults to: {}) —

    options hash of parameters

Options Hash (opts):

  • id (Integer) —

    The id of display

  • name (String) —

    The name of the display

  • options (Hash) —

    Display options

  • screenIds (Array) —

    Screen ids used to display

  • active (Boolean) —

    Whether display is active

  • created (String) —

    Date display was created

  • enabled (Boolean) —

    Whether display is enabled

Returns:

  • (Hashie::Mash) —

    Updated display



55
56
57
# File 'lib/bwapi/client/command_center/displays.rb', line 55

def update_display display_id, opts={}
  put "commandcenter/displays/#{display_id}", opts
end