Class: Awslive::InputSwitchScheduleAction
- Inherits:
-
Object
- Object
- Awslive::InputSwitchScheduleAction
- Defined in:
- lib/awslive-scheduler/input_switch_schedule_action.rb
Constant Summary collapse
- FOLLOW_HASH =
{ action_name: "f1", schedule_action_start_settings: { follow_mode_schedule_action_start_settings: { reference_action_name: "imm", follow_point: "END" } }, schedule_action_settings: { input_switch_settings: { input_attachment_name_reference: "input1", url_path: [] } } }
- IMMEDIATE_HASH =
{ :action_name => "action_name", :schedule_action_start_settings => { :immediate_mode_schedule_action_start_settings => {} }, :schedule_action_settings => { :input_switch_settings => { :input_attachment_name_reference => "input_name", :url_path => [] } } }
Instance Method Summary collapse
- #get_action_id ⇒ Object
- #get_follow_schedule_action(follow_input, trigger_input, urlpath = nil) ⇒ Object
- #get_immediate_schedule_action(input_ref_name, urlpath = nil) ⇒ Object
Instance Method Details
#get_action_id ⇒ Object
50 51 52 |
# File 'lib/awslive-scheduler/input_switch_schedule_action.rb', line 50 def get_action_id Time.now.to_i end |
#get_follow_schedule_action(follow_input, trigger_input, urlpath = nil) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/awslive-scheduler/input_switch_schedule_action.rb', line 41 def get_follow_schedule_action(follow_input, trigger_input, urlpath = nil) action_hash = FOLLOW_HASH.clone action_hash[:action_name] = "#{get_action_id}" action_hash[:schedule_action_start_settings][:follow_mode_schedule_action_start_settings][:reference_action_name] = "#{follow_input}" action_hash[:schedule_action_settings][:input_switch_settings][:input_attachment_name_reference] = "#{trigger_input}" action_hash[:schedule_action_settings][:input_switch_settings][:url_path] = [ urlpath ] unless urlpath.nil? action_hash end |
#get_immediate_schedule_action(input_ref_name, urlpath = nil) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/awslive-scheduler/input_switch_schedule_action.rb', line 33 def get_immediate_schedule_action( input_ref_name, urlpath = nil) action_hash = IMMEDIATE_HASH.clone action_hash[:action_name] = "#{get_action_id}" action_hash[:schedule_action_settings][:input_switch_settings][:input_attachment_name_reference] = "#{input_ref_name}" action_hash[:schedule_action_settings][:input_switch_settings][:url_path] = [ urlpath ] unless urlpath.nil? action_hash end |