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 = {}) ⇒ Hash

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:

  • (Hash)

    New display



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

def create_display(opts = {})
  post 'commandcenter/displays', opts
end

#delete_display(display_id) ⇒ Hash

Delete an existing display

Parameters:

  • display_id (Integer)

    the display id

Returns:

  • (Hash)

    Deleted display



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

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

#displaysHash

Get the displays visible to the user

Returns:

  • (Hash)

    All displays



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

def displays
  get 'commandcenter/displays'
end

#get_display(display_id) ⇒ Hash

Get an existing display

Parameters:

  • display_id (Integer)

    the display id

Returns:

  • (Hash)

    Specific display



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

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

#update_display(display_id, opts = {}) ⇒ Hash

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:

  • (Hash)

    Updated display



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

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