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.



4518
4519
4520
# File 'lib/kaltura_client.rb', line 4518

def initialize(client)
	super(client)
end

Instance Method Details

#collect(event) ⇒ bool

Will write to the event log a single line representing the event client version - will help interpret 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

Returns:

  • (bool)


4545
4546
4547
4548
4549
4550
4551
4552
4553
# File 'lib/kaltura_client.rb', line 4545

def collect(event)
	kparams = {}
	client.add_param(kparams, 'event', event)
	client.queue_service_action_call('stats', 'collect', 'bool', 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

Returns:



4558
4559
4560
4561
4562
4563
4564
4565
4566
# File 'lib/kaltura_client.rb', line 4558

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_device_capabilities(data) ⇒ Object

Use this action to report device capabilities to the kaltura server.

Returns:



4570
4571
4572
4573
4574
4575
4576
4577
4578
# File 'lib/kaltura_client.rb', line 4570

def report_device_capabilities(data)
	kparams = {}
	client.add_param(kparams, 'data', data)
	client.queue_service_action_call('stats', 'reportDeviceCapabilities', '', 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.

Returns:



4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
# File 'lib/kaltura_client.rb', line 4582

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

Returns:



4594
4595
4596
4597
4598
4599
4600
4601
4602
# File 'lib/kaltura_client.rb', line 4594

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