Class: Kaltura::KalturaDataService

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

Overview

Data service lets you manage data content (textual content)

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaDataService

Returns a new instance of KalturaDataService.



1332
1333
1334
# File 'lib/kaltura_client.rb', line 1332

def initialize(client)
	super(client)
end

Instance Method Details

#add(data_entry) ⇒ KalturaDataEntry

Adds a new data entry

Returns:



1338
1339
1340
1341
1342
1343
1344
1345
1346
# File 'lib/kaltura_client.rb', line 1338

def add(data_entry)
	kparams = {}
	client.add_param(kparams, 'dataEntry', data_entry)
	client.queue_service_action_call('data', 'add', 'KalturaDataEntry', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#add_content(entry_id, resource) ⇒ string

Update the dataContent of data entry using a resource

Returns:

  • (string)


1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/kaltura_client.rb', line 1350

def add_content(entry_id, resource)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'resource', resource)
	client.queue_service_action_call('data', 'addContent', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(entry_id) ⇒ Object

Delete a data entry.

Returns:



1363
1364
1365
1366
1367
1368
1369
1370
1371
# File 'lib/kaltura_client.rb', line 1363

def delete(entry_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.queue_service_action_call('data', 'delete', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(entry_id, version = -1)) ⇒ KalturaDataEntry

Get data entry by ID.

Returns:



1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
# File 'lib/kaltura_client.rb', line 1375

def get(entry_id, version=-1)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'version', version)
	client.queue_service_action_call('data', 'get', 'KalturaDataEntry', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaDataListResponse

List data entries by filter with paging support.



1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
# File 'lib/kaltura_client.rb', line 1388

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('data', 'list', 'KalturaDataListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#serve(entry_id, version = -1,, force_proxy = false) ⇒ file

return the file from dataContent field.

Returns:

  • (file)


1401
1402
1403
1404
1405
1406
1407
1408
# File 'lib/kaltura_client.rb', line 1401

def serve(entry_id, version=-1, force_proxy=false)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'version', version)
	client.add_param(kparams, 'forceProxy', force_proxy)
	client.queue_service_action_call('data', 'serve', 'file', kparams)
	return client.get_serve_url()
end

#update(entry_id, document_entry) ⇒ KalturaDataEntry

Update data entry. Only the properties that were set will be updated.

Returns:



1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
# File 'lib/kaltura_client.rb', line 1412

def update(entry_id, document_entry)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'documentEntry', document_entry)
	client.queue_service_action_call('data', 'update', 'KalturaDataEntry', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end