Class: Kaltura::KalturaReportService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Overview

api for getting reports data by the report type and some inputFilter

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaReportService

Returns a new instance of KalturaReportService.



12524
12525
12526
# File 'lib/kaltura_client.rb', line 12524

def initialize(client)
	super(client)
end

Instance Method Details

#execute(id, params = KalturaNotImplemented) ⇒ Object



12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
# File 'lib/kaltura_client.rb', line 12621

def execute(id, params=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id);
	params.each do |obj|
		client.add_param(kparams, 'params', obj);
	end
	client.queue_service_action_call('report', 'execute', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get_base_total(report_type, report_input_filter, object_ids = KalturaNotImplemented) ⇒ Object

report getBaseTotal action allows to get a the total base for storage reports



12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
# File 'lib/kaltura_client.rb', line 12563

def get_base_total(report_type, report_input_filter, object_ids=KalturaNotImplemented)
	kparams = {}
	#  
	client.add_param(kparams, 'reportType', report_type);
	client.add_param(kparams, 'reportInputFilter', report_input_filter);
	# - one ID or more (separated by ',') of specific objects to query
	client.add_param(kparams, 'objectIds', object_ids);
	client.queue_service_action_call('report', 'getBaseTotal', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get_csv(id, params = KalturaNotImplemented) ⇒ Object



12634
12635
12636
12637
12638
12639
12640
12641
12642
# File 'lib/kaltura_client.rb', line 12634

def get_csv(id, params=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id);
	params.each do |obj|
		client.add_param(kparams, 'params', obj);
	end
	client.queue_service_action_call('report', 'getCsv', kparams);
	return client.get_serve_url();
end

#get_csv_from_string_params(id, params = KalturaNotImplemented) ⇒ Object

Returns report CSV file executed by string params with the following convention: param1=value1;param2=value2



12646
12647
12648
12649
12650
12651
12652
# File 'lib/kaltura_client.rb', line 12646

def get_csv_from_string_params(id, params=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id);
	client.add_param(kparams, 'params', params);
	client.queue_service_action_call('report', 'getCsvFromStringParams', kparams);
	return client.get_serve_url();
end

#get_graphs(report_type, report_input_filter, dimension = KalturaNotImplemented, object_ids = KalturaNotImplemented) ⇒ Object

report getGraphs action allows to get a graph data for a specific report.



12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
# File 'lib/kaltura_client.rb', line 12530

def get_graphs(report_type, report_input_filter, dimension=KalturaNotImplemented, object_ids=KalturaNotImplemented)
	kparams = {}
	#  
	client.add_param(kparams, 'reportType', report_type);
	client.add_param(kparams, 'reportInputFilter', report_input_filter);
	client.add_param(kparams, 'dimension', dimension);
	# - one ID or more (separated by ',') of specific objects to query
	client.add_param(kparams, 'objectIds', object_ids);
	client.queue_service_action_call('report', 'getGraphs', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get_table(report_type, report_input_filter, pager, order = KalturaNotImplemented, object_ids = KalturaNotImplemented) ⇒ Object

report getTable action allows to get a graph data for a specific report.



12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
# File 'lib/kaltura_client.rb', line 12579

def get_table(report_type, report_input_filter, pager, order=KalturaNotImplemented, object_ids=KalturaNotImplemented)
	kparams = {}
	#  
	client.add_param(kparams, 'reportType', report_type);
	client.add_param(kparams, 'reportInputFilter', report_input_filter);
	client.add_param(kparams, 'pager', pager);
	client.add_param(kparams, 'order', order);
	# - one ID or more (separated by ',') of specific objects to query
	client.add_param(kparams, 'objectIds', object_ids);
	client.queue_service_action_call('report', 'getTable', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get_total(report_type, report_input_filter, object_ids = KalturaNotImplemented) ⇒ Object

report getTotal action allows to get a graph data for a specific report.



12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
# File 'lib/kaltura_client.rb', line 12547

def get_total(report_type, report_input_filter, object_ids=KalturaNotImplemented)
	kparams = {}
	#  
	client.add_param(kparams, 'reportType', report_type);
	client.add_param(kparams, 'reportInputFilter', report_input_filter);
	# - one ID or more (separated by ',') of specific objects to query
	client.add_param(kparams, 'objectIds', object_ids);
	client.queue_service_action_call('report', 'getTotal', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get_url_for_report_as_csv(report_title, report_text, headers, report_type, report_input_filter, dimension = KalturaNotImplemented, pager = KalturaNotImplemented, order = KalturaNotImplemented, object_ids = KalturaNotImplemented) ⇒ Object

will create a Csv file for the given report and return the URL to access it



12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
# File 'lib/kaltura_client.rb', line 12597

def get_url_for_report_as_csv(report_title, report_text, headers, report_type, report_input_filter, dimension=KalturaNotImplemented, pager=KalturaNotImplemented, order=KalturaNotImplemented, object_ids=KalturaNotImplemented)
	kparams = {}
	# The title of the report to display at top of CSV 
	client.add_param(kparams, 'reportTitle', report_title);
	# The text of the filter of the report
	client.add_param(kparams, 'reportText', report_text);
	# The headers of the columns - a map between the enumerations on the server side and the their display text  
	client.add_param(kparams, 'headers', headers);
	#  
	client.add_param(kparams, 'reportType', report_type);
	client.add_param(kparams, 'reportInputFilter', report_input_filter);
	# 	  
	client.add_param(kparams, 'dimension', dimension);
	client.add_param(kparams, 'pager', pager);
	client.add_param(kparams, 'order', order);
	# - one ID or more (separated by ',') of specific objects to query
	client.add_param(kparams, 'objectIds', object_ids);
	client.queue_service_action_call('report', 'getUrlForReportAsCsv', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end