Class: Kaltura::KalturaStatsService

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

Overview

Stats Service

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaStatsService

Returns a new instance of KalturaStatsService.



12849
12850
12851
# File 'lib/kaltura_client.rb', line 12849

def initialize(client)
	super(client)
end

Instance Method Details

#collect(event) ⇒ Object

Will write to the event log a single line representing the event client version - will help interprete the line structure. different client versions might have slightly different data/data formats in the line event_id - number is the row number in yuval’s excel datetime - same format as MySql’s datetime - can change and should reflect the time zone session id - can be some big random number or guid partner id entry id unique viewer widget id ui_conf id uid - the puser id as set by the ppartner current point - in milliseconds duration - milliseconds user ip process duration - in milliseconds control id seek new point referrer KalturaStatsEvent $event



12876
12877
12878
12879
12880
12881
12882
12883
12884
# File 'lib/kaltura_client.rb', line 12876

def collect(event)
	kparams = {}
	client.add_param(kparams, 'event', event);
	client.queue_service_action_call('stats', 'collect', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#kmc_collect(kmc_event) ⇒ Object

Will collect the kmcEvent sent form the KMC client // this will actually be an empty function because all events will be sent using GET and will anyway be logged in the apache log



12889
12890
12891
12892
12893
12894
12895
12896
12897
# File 'lib/kaltura_client.rb', line 12889

def kmc_collect(kmc_event)
	kparams = {}
	client.add_param(kparams, 'kmcEvent', kmc_event);
	client.queue_service_action_call('stats', 'kmcCollect', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#report_error(error_code, error_message) ⇒ Object

Use this action to report errors to the kaltura server.



12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
# File 'lib/kaltura_client.rb', line 12911

def report_error(error_code, error_message)
	kparams = {}
	client.add_param(kparams, 'errorCode', error_code);
	client.add_param(kparams, 'errorMessage', error_message);
	client.queue_service_action_call('stats', 'reportError', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#report_kce_error(kaltura_ce_error) ⇒ Object



12899
12900
12901
12902
12903
12904
12905
12906
12907
# File 'lib/kaltura_client.rb', line 12899

def report_kce_error(kaltura_ce_error)
	kparams = {}
	client.add_param(kparams, 'kalturaCEError', kaltura_ce_error);
	client.queue_service_action_call('stats', 'reportKceError', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end