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

Included in:
BWAPI::Client::CommandCenter::Displays
Defined in:
lib/bwapi/client/command_center/displays/scenes.rb

Overview

Displays module for commandcenter/displays/scenes endpoints

Instance Method Summary collapse

Instance Method Details

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

Create a new display scene

Parameters:

  • display_id (Integer) —

    The display id

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

    options hash of parameters

Options Hash (opts):

  • id (Integer) —

    The id of scene

  • String (]) —

    tring] name The name of the scene

  • projectId (Integer) —

    The project id

  • displayId (Integer) —

    The display id

  • options (Hash) —

    Scene options

  • sceneTypeId (Integer) —

    Scene type id

  • subSceneIds (Array) —

    Sub Scene ids

  • created (String) —

    Date scene was created

  • enabled (Boolean) —

    Whether scene is enabled

  • filter (Hash) —

    Filter options

Returns:

  • (Hashie::Mash) —

    New display scene



49
50
51
# File 'lib/bwapi/client/command_center/displays/scenes.rb', line 49

def create_scene display_id, opts={}
  post "commandcenter/displays/#{display_id}/scenes", opts
end

#delete_scene(display_id, scene_id) ⇒ Hashie::Mash

Delete an existing display scene

Parameters:

  • display_id (Integer) —

    The display id

  • scene_id (Integer) —

    The scene id

Returns:

  • (Hashie::Mash) —

    Deleted display scene



77
78
79
# File 'lib/bwapi/client/command_center/displays/scenes.rb', line 77

def delete_scene display_id, scene_id
  delete "commandcenter/displays/#{display_id}/scenes/#{scene_id}"
end

#get_scene(display_id, scene_id) ⇒ Hashie::Mash

Get an existing display scene

Parameters:

  • display_id (Integer) —

    The display id

  • scene_id (Integer) —

    The scene id

Returns:

  • (Hashie::Mash) —

    Specific scene for display



21
22
23
# File 'lib/bwapi/client/command_center/displays/scenes.rb', line 21

def get_scene display_id, scene_id
  get "commandcenter/displays/#{display_id}/scenes/#{scene_id}"
end

#get_scene_with_sub_scenes(display_id, scene_id) ⇒ Hashie::Mash

Get an existing display scene sub scenes

Parameters:

  • display_id (Integer) —

    The display id

  • scene_id (Integer) —

    The scene id

Returns:

  • (Hashie::Mash) —

    Specific sub scenes for display scene



30
31
32
# File 'lib/bwapi/client/command_center/displays/scenes.rb', line 30

def get_scene_with_sub_scenes display_id, scene_id
  get "commandcenter/displays/#{display_id}/scenes/#{scene_id}/subscenes"
end

#scenes(display_id) ⇒ Hashie::Mash

Get the scenes for an existing display

Parameters:

  • display_id (Integer) —

    The display id

Returns:

  • (Hashie::Mash) —

    All scenes for display



12
13
14
# File 'lib/bwapi/client/command_center/displays/scenes.rb', line 12

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

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

Update an existing display scene

Parameters:

  • display_id (Integer) —

    The display id

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

    options hash of parameters

Options Hash (opts):

  • id (Integer) —

    The id of scene

  • String (]) —

    tring] name The name of the scene

  • options (Hash) —

    Scene options

  • projectId (Integer) —

    The project id

  • displayId (Integer) —

    The display id

  • sceneTypeId (Integer) —

    Scene type id

  • subSceneIds (Array) —

    Sub Scene ids

  • created (String) —

    Date scene was created

  • enabled (Boolean) —

    Whether scene is enabled

  • filter (Hash) —

    Filter options

Returns:

  • (Hashie::Mash) —

    Updated display scene



68
69
70
# File 'lib/bwapi/client/command_center/displays/scenes.rb', line 68

def update_scene display_id, scene_id, opts={}
  put "commandcenter/displays/#{display_id}/scenes/#{scene_id}", opts
end