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

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

  • name (String)

    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:

  • (Hash)

    New display scene



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

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

#delete_scene(display_id, scene_id) ⇒ Hash

Delete an existing display scene

Parameters:

  • display_id (Integer)

    The display id

  • scene_id (Integer)

    The scene id

Returns:

  • (Hash)

    Deleted display scene



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

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

#get_scene(display_id, scene_id) ⇒ Hash

Get an existing display scene

Parameters:

  • display_id (Integer)

    The display id

  • scene_id (Integer)

    The scene id

Returns:

  • (Hash)

    Specific scene for display



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

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) ⇒ Hash

Get an existing display scene sub scenes

Parameters:

  • display_id (Integer)

    The display id

  • scene_id (Integer)

    The scene id

Returns:

  • (Hash)

    Specific sub scenes for display scene



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

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

#scenes(display_id) ⇒ Hash

Get the scenes for an existing display

Parameters:

  • display_id (Integer)

    The display id

Returns:

  • (Hash)

    All scenes for display



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

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

#update_scene(display_id, scene_id, opts = {}) ⇒ Hash

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:

  • (Hash)

    Updated display scene



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

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