Class: Kaltura::ServiceActionCall

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ServiceActionCall.



156
157
158
159
160
# File 'lib/kaltura/kaltura_client_base.rb', line 156

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.



153
154
155
# File 'lib/kaltura/kaltura_client_base.rb', line 153

def action
  @action
end

#paramsObject

Returns the value of attribute params.



154
155
156
# File 'lib/kaltura/kaltura_client_base.rb', line 154

def params
  @params
end

#serviceObject

Returns the value of attribute service.



152
153
154
# File 'lib/kaltura/kaltura_client_base.rb', line 152

def service
  @service
end

Instance Method Details

#get_params_for_multirequest(multirequest_index) ⇒ Object



174
175
176
177
178
179
180
181
182
# File 'lib/kaltura/kaltura_client_base.rb', line 174

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



162
163
164
165
166
167
168
169
170
171
172
# File 'lib/kaltura/kaltura_client_base.rb', line 162

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