Class: Kaltura::Service::DataService
- Inherits:
-
BaseService
- Object
- BaseService
- Kaltura::Service::DataService
- Defined in:
- lib/kaltura/service/data_service.rb
Overview
The Data Service allows you to add and manage texual content.
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
-
#add(data_entry) ⇒ Kaltura::DataEntry
Adds a new data entry.
-
#delete(entry_id) ⇒ nil
Removes a DataEntry object.
-
#get(entry_id, version = -1)) ⇒ Kaltura::DataEntry
Gets a data entry by ID.
-
#list(filter = nil, pager = nil) ⇒ Kaltura::Response::DataListResponse
Lists DataEntry objects with the given filter and paging support for larger sets of data.
-
#update(entry_id, document_entry) ⇒ Kaltura::DataEntry
Updates a data entry.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Kaltura::Service::BaseService
Instance Method Details
#add(data_entry) ⇒ Kaltura::DataEntry
Adds a new data entry.
40 41 42 43 44 |
# File 'lib/kaltura/service/data_service.rb', line 40 def add(data_entry) kparams = {} client.add_param(kparams, 'dataEntry', data_entry) perform_request('data','add',kparams,false) end |
#delete(entry_id) ⇒ nil
Removes a DataEntry object.
92 93 94 95 96 |
# File 'lib/kaltura/service/data_service.rb', line 92 def delete(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id) perform_request('data','delete',kparams,false) end |
#get(entry_id, version = -1)) ⇒ Kaltura::DataEntry
Gets a data entry by ID.
56 57 58 59 60 61 |
# File 'lib/kaltura/service/data_service.rb', line 56 def get(entry_id, version=-1) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'version', version) perform_request('data','get',kparams,false) end |
#list(filter = nil, pager = nil) ⇒ Kaltura::Response::DataListResponse
Lists DataEntry objects with the given filter and paging support for larger sets of data.
108 109 110 111 112 113 |
# File 'lib/kaltura/service/data_service.rb', line 108 def list(filter=nil, pager=nil) kparams = {} client.add_param(kparams, 'filter', filter) client.add_param(kparams, 'pager', pager) perform_request('data','list',kparams,false) end |
#update(entry_id, document_entry) ⇒ Kaltura::DataEntry
Updates a data entry. As with other update actions, the best practice is to instantiate a new Kaltura::DataEntry object and set the fields of that object that you wish to change.
76 77 78 79 80 81 |
# File 'lib/kaltura/service/data_service.rb', line 76 def update(entry_id, document_entry) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'documentEntry', document_entry) perform_request('data','update',kparams,false) end |