Class: Kaltura::KalturaBulkUploadService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaBulkUploadService
- Defined in:
- lib/kaltura_client.rb
Overview
Bulk upload service is used to upload & manage bulk uploads using CSV files.
This service manages only entry bulk uploads.
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#abort(id) ⇒ Object
Aborts the bulk upload and all its child jobs.
-
#add(conversion_profile_id, csv_file_data, bulk_upload_type = KalturaNotImplemented, uploaded_by = KalturaNotImplemented, file_name = KalturaNotImplemented) ⇒ Object
Add new bulk upload batch job Conversion profile id can be specified in the API or in the CSV file, the one in the CSV file will be stronger.
-
#get(id) ⇒ Object
Get bulk upload batch job by id.
-
#initialize(client) ⇒ KalturaBulkUploadService
constructor
A new instance of KalturaBulkUploadService.
-
#list(pager = KalturaNotImplemented) ⇒ Object
List bulk upload batch jobs.
-
#serve(id) ⇒ Object
serve action returan the original file.
-
#serve_log(id) ⇒ Object
serveLog action returan the original file.
Constructor Details
#initialize(client) ⇒ KalturaBulkUploadService
Returns a new instance of KalturaBulkUploadService.
9548 9549 9550 |
# File 'lib/kaltura_client.rb', line 9548 def initialize(client) super(client) end |
Instance Method Details
#abort(id) ⇒ Object
Aborts the bulk upload and all its child jobs
9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 |
# File 'lib/kaltura_client.rb', line 9619 def abort(id) kparams = {} # job id client.add_param(kparams, 'id', id); client.queue_service_action_call('bulkupload', 'abort', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#add(conversion_profile_id, csv_file_data, bulk_upload_type = KalturaNotImplemented, uploaded_by = KalturaNotImplemented, file_name = KalturaNotImplemented) ⇒ Object
Add new bulk upload batch job Conversion profile id can be specified in the API or in the CSV file, the one in the CSV file will be stronger. If no conversion profile was specified, partner’s default will be used
9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 |
# File 'lib/kaltura_client.rb', line 9556 def add(conversion_profile_id, csv_file_data, bulk_upload_type=KalturaNotImplemented, uploaded_by=KalturaNotImplemented, file_name=KalturaNotImplemented) kparams = {} # Convertion profile id to use for converting the current bulk (-1 to use partner's default) client.add_param(kparams, 'conversionProfileId', conversion_profile_id); # bulk upload file client.add_param(kparams, 'csvFileData', csv_file_data); client.add_param(kparams, 'bulkUploadType', bulk_upload_type); client.add_param(kparams, 'uploadedBy', uploaded_by); # Friendly name of the file, used to be recognized later in the logs. client.add_param(kparams, 'fileName', file_name); client.queue_service_action_call('bulkupload', 'add', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#get(id) ⇒ Object
Get bulk upload batch job by id
9575 9576 9577 9578 9579 9580 9581 9582 9583 |
# File 'lib/kaltura_client.rb', line 9575 def get(id) kparams = {} client.add_param(kparams, 'id', id); client.queue_service_action_call('bulkupload', 'get', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#list(pager = KalturaNotImplemented) ⇒ Object
List bulk upload batch jobs
9587 9588 9589 9590 9591 9592 9593 9594 9595 |
# File 'lib/kaltura_client.rb', line 9587 def list(pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'pager', pager); client.queue_service_action_call('bulkupload', 'list', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#serve(id) ⇒ Object
serve action returan the original file.
9599 9600 9601 9602 9603 9604 9605 |
# File 'lib/kaltura_client.rb', line 9599 def serve(id) kparams = {} # job id client.add_param(kparams, 'id', id); client.queue_service_action_call('bulkupload', 'serve', kparams); return client.get_serve_url(); end |
#serve_log(id) ⇒ Object
serveLog action returan the original file.
9609 9610 9611 9612 9613 9614 9615 |
# File 'lib/kaltura_client.rb', line 9609 def serve_log(id) kparams = {} # job id client.add_param(kparams, 'id', id); client.queue_service_action_call('bulkupload', 'serveLog', kparams); return client.get_serve_url(); end |