Class: Kaltura::KalturaDataService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaDataService
- Defined in:
- lib/kaltura_client.rb
Overview
Data service lets you manage data content (textual content)
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(data_entry) ⇒ KalturaDataEntry
Adds a new data entry.
-
#add_content(entry_id, resource) ⇒ string
Update the dataContent of data entry using a resource.
-
#delete(entry_id) ⇒ Object
Delete a data entry.
-
#get(entry_id, version = -1)) ⇒ KalturaDataEntry
Get data entry by ID.
-
#initialize(client) ⇒ KalturaDataService
constructor
A new instance of KalturaDataService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaDataListResponse
List data entries by filter with paging support.
-
#serve(entry_id, version = -1,, force_proxy = false) ⇒ file
return the file from dataContent field.
-
#update(entry_id, document_entry) ⇒ KalturaDataEntry
Update data entry.
Constructor Details
#initialize(client) ⇒ KalturaDataService
Returns a new instance of KalturaDataService.
1315 1316 1317 |
# File 'lib/kaltura_client.rb', line 1315 def initialize(client) super(client) end |
Instance Method Details
#add(data_entry) ⇒ KalturaDataEntry
Adds a new data entry
1321 1322 1323 1324 1325 1326 1327 1328 1329 |
# File 'lib/kaltura_client.rb', line 1321 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
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 |
# File 'lib/kaltura_client.rb', line 1333 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.
1346 1347 1348 1349 1350 1351 1352 1353 1354 |
# File 'lib/kaltura_client.rb', line 1346 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.
1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 |
# File 'lib/kaltura_client.rb', line 1358 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.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 |
# File 'lib/kaltura_client.rb', line 1371 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.
1384 1385 1386 1387 1388 1389 1390 1391 |
# File 'lib/kaltura_client.rb', line 1384 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.
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 |
# File 'lib/kaltura_client.rb', line 1395 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 |