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.



3955
3956
3957
# File 'lib/kaltura_client.rb', line 3955

def initialize(client)
	super(client)
end

Instance Method Details

#execute(id, params = KalturaNotImplemented) ⇒ KalturaReportResponse



3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
# File 'lib/kaltura_client.rb', line 3960

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

#export_to_csv(params) ⇒ KalturaReportExportResponse



3972
3973
3974
3975
3976
3977
3978
3979
3980
# File 'lib/kaltura_client.rb', line 3972

def export_to_csv(params)
	kparams = {}
	client.add_param(kparams, 'params', params)
	client.queue_service_action_call('report', 'exportToCsv', 'KalturaReportExportResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_base_total(report_type, report_input_filter, object_ids = KalturaNotImplemented, response_options = KalturaNotImplemented) ⇒ array

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

Returns:

  • (array)


3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
# File 'lib/kaltura_client.rb', line 3984

def get_base_total(report_type, report_input_filter, object_ids=KalturaNotImplemented, response_options=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'reportType', report_type)
	client.add_param(kparams, 'reportInputFilter', report_input_filter)
	client.add_param(kparams, 'objectIds', object_ids)
	client.add_param(kparams, 'responseOptions', response_options)
	client.queue_service_action_call('report', 'getBaseTotal', 'KalturaReportBaseTotal', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_csv(id, params = KalturaNotImplemented, excluded_fields = KalturaNotImplemented) ⇒ file

Returns:

  • (file)


3998
3999
4000
4001
4002
4003
4004
4005
# File 'lib/kaltura_client.rb', line 3998

def get_csv(id, params=KalturaNotImplemented, excluded_fields=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'params', params)
	client.add_param(kparams, 'excludedFields', excluded_fields)
	client.queue_service_action_call('report', 'getCsv', 'file', kparams)
	return client.get_serve_url()
end

#get_csv_from_string_params(id, params = KalturaNotImplemented, excluded_fields = KalturaNotImplemented) ⇒ file

Returns report CSV file executed by string params with the following convention: param1=value1;param2=value2 excludedFields can be supplied comma separated

Returns:

  • (file)


4010
4011
4012
4013
4014
4015
4016
4017
# File 'lib/kaltura_client.rb', line 4010

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

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

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

Returns:

  • (array)


4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
# File 'lib/kaltura_client.rb', line 4021

def get_graphs(report_type, report_input_filter, dimension=KalturaNotImplemented, object_ids=KalturaNotImplemented, response_options=KalturaNotImplemented)
	kparams = {}
	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, 'objectIds', object_ids)
	client.add_param(kparams, 'responseOptions', response_options)
	client.queue_service_action_call('report', 'getGraphs', 'KalturaReportGraph', 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, response_options = KalturaNotImplemented) ⇒ KalturaReportTable

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

Returns:



4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
# File 'lib/kaltura_client.rb', line 4037

def get_table(report_type, report_input_filter, pager, order=KalturaNotImplemented, object_ids=KalturaNotImplemented, response_options=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)
	client.add_param(kparams, 'objectIds', object_ids)
	client.add_param(kparams, 'responseOptions', response_options)
	client.queue_service_action_call('report', 'getTable', 'KalturaReportTable', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_total(report_type, report_input_filter, object_ids = KalturaNotImplemented, response_options = KalturaNotImplemented) ⇒ KalturaReportTotal

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

Returns:



4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
# File 'lib/kaltura_client.rb', line 4054

def get_total(report_type, report_input_filter, object_ids=KalturaNotImplemented, response_options=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'reportType', report_type)
	client.add_param(kparams, 'reportInputFilter', report_input_filter)
	client.add_param(kparams, 'objectIds', object_ids)
	client.add_param(kparams, 'responseOptions', response_options)
	client.queue_service_action_call('report', 'getTotal', 'KalturaReportTotal', 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, response_options = KalturaNotImplemented) ⇒ string

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

Returns:

  • (string)


4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
# File 'lib/kaltura_client.rb', line 4069

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, response_options=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'reportTitle', report_title)
	client.add_param(kparams, 'reportText', report_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)
	client.add_param(kparams, 'objectIds', object_ids)
	client.add_param(kparams, 'responseOptions', response_options)
	client.queue_service_action_call('report', 'getUrlForReportAsCsv', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#serve(id) ⇒ string

Will serve a requested report

Returns:

  • (string)


4090
4091
4092
4093
4094
4095
4096
4097
4098
# File 'lib/kaltura_client.rb', line 4090

def serve(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('report', 'serve', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end