Class: Kaltura::KalturaServiceActionCall
- Inherits:
-
Object
- Object
- Kaltura::KalturaServiceActionCall
- Defined in:
- lib/kaltura_client_base.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#params ⇒ Object
Returns the value of attribute params.
-
#service ⇒ Object
Returns the value of attribute service.
Instance Method Summary collapse
- #get_params_for_multirequest(multirequest_index) ⇒ Object
-
#initialize(service, action, params = array()) ⇒ KalturaServiceActionCall
constructor
A new instance of KalturaServiceActionCall.
- #parse_params(params) ⇒ Object
Constructor Details
#initialize(service, action, params = array()) ⇒ KalturaServiceActionCall
Returns a new instance of KalturaServiceActionCall.
162 163 164 165 166 |
# File 'lib/kaltura_client_base.rb', line 162 def initialize(service, action, params = array()) @service = service @action = action @params = parse_params(params) end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
159 160 161 |
# File 'lib/kaltura_client_base.rb', line 159 def action @action end |
#params ⇒ Object
Returns the value of attribute params.
160 161 162 |
# File 'lib/kaltura_client_base.rb', line 160 def params @params end |
#service ⇒ Object
Returns the value of attribute service.
158 159 160 |
# File 'lib/kaltura_client_base.rb', line 158 def service @service end |
Instance Method Details
#get_params_for_multirequest(multirequest_index) ⇒ Object
180 181 182 183 184 185 186 187 188 |
# File 'lib/kaltura_client_base.rb', line 180 def get_params_for_multirequest(multirequest_index) multirequest_params = {} multirequest_params[multirequest_index+":service"] = @service multirequest_params[multirequest_index+":action"] = @action @params.each do |key| multirequest_params[multirequest_index+":"+key] = @params[key] end return multirequest_params end |
#parse_params(params) ⇒ Object
168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/kaltura_client_base.rb', line 168 def parse_params(params) new_params = {} params.each do |key, val| if val.kind_of? Hash new_params[key] = parse_params(val) else new_params[key] = val end end return new_params end |