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



3822
3823
3824
# File 'lib/kaltura_client.rb', line 3822

def initialize(client)
  super(client)
end

Instance Method Details

#execute(id, params = KalturaNotImplemented) ⇒ KalturaReportResponse



3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
# File 'lib/kaltura_client.rb', line 3827

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



3839
3840
3841
3842
3843
3844
3845
3846
3847
# File 'lib/kaltura_client.rb', line 3839

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



3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
# File 'lib/kaltura_client.rb', line 3851

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) ⇒ file



3865
3866
3867
3868
3869
3870
3871
# File 'lib/kaltura_client.rb', line 3865

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

#get_csv_from_string_params(id, params = KalturaNotImplemented) ⇒ file

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



3875
3876
3877
3878
3879
3880
3881
# File 'lib/kaltura_client.rb', line 3875

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', '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.



3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
# File 'lib/kaltura_client.rb', line 3885

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.



3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
# File 'lib/kaltura_client.rb', line 3901

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.



3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'lib/kaltura_client.rb', line 3918

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



3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
# File 'lib/kaltura_client.rb', line 3933

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



3954
3955
3956
3957
3958
3959
3960
3961
3962
# File 'lib/kaltura_client.rb', line 3954

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