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.



1276
1277
1278
# File 'lib/kaltura_client.rb', line 1276

def initialize(client)
  super(client)
end

Instance Method Details

#add(data_entry) ⇒ KalturaDataEntry

Adds a new data entry

Returns:



1282
1283
1284
1285
1286
1287
1288
1289
1290
# File 'lib/kaltura_client.rb', line 1282

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)


1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
# File 'lib/kaltura_client.rb', line 1294

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:



1307
1308
1309
1310
1311
1312
1313
1314
1315
# File 'lib/kaltura_client.rb', line 1307

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:



1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
# File 'lib/kaltura_client.rb', line 1319

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.



1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
# File 'lib/kaltura_client.rb', line 1332

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)


1345
1346
1347
1348
1349
1350
1351
1352
# File 'lib/kaltura_client.rb', line 1345

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:



1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
# File 'lib/kaltura_client.rb', line 1356

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