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



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

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



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

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

#displaysHashie::Mash

Get the displays visible to the user

Returns:

  • (Hashie::Mash)

    All displays



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

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



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

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



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

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