Class: Kaltura::KalturaServiceActionCall

Inherits:
Object
  • Object
show all
Defined in:
lib/kaltura_client_base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service, action, params = array()) ⇒ KalturaServiceActionCall

Returns a new instance of KalturaServiceActionCall.



284
285
286
287
288
# File 'lib/kaltura_client_base.rb', line 284

def initialize(service, action, params = array())
	@service = service
	@action = action
	@params = parse_params(params)
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



281
282
283
# File 'lib/kaltura_client_base.rb', line 281

def action
  @action
end

#paramsObject

Returns the value of attribute params.



282
283
284
# File 'lib/kaltura_client_base.rb', line 282

def params
  @params
end

#serviceObject

Returns the value of attribute service.



280
281
282
# File 'lib/kaltura_client_base.rb', line 280

def service
  @service
end

Instance Method Details

#get_params_for_multirequest(multirequest_index) ⇒ Object



302
303
304
305
306
307
308
309
310
# File 'lib/kaltura_client_base.rb', line 302

def get_params_for_multirequest(multirequest_index)
	multirequest_params = {}
	multirequest_params[multirequest_index.to_s+":service"] = @service
	multirequest_params[multirequest_index.to_s+":action"] = @action
	@params.each_key do |key|
		multirequest_params[multirequest_index.to_s+":"+key] = @params[key]
	end
	return multirequest_params
end

#parse_params(params) ⇒ Object



290
291
292
293
294
295
296
297
298
299
300
# File 'lib/kaltura_client_base.rb', line 290

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