# =================================================================================================== # _ __ _ _ # | |/ /__ _| | |_ _ _ _ _ __ _ # | ' . # # @ignore # =================================================================================================== require 'kaltura_client.rb' module Kaltura # This class represents object-specific data passed to the # bulk upload job. class KalturaBulkServiceData < KalturaObjectBase def from_xml(xml_element) super end end # Bulk upload service is used to upload & manage bulk uploads class KalturaBulkService < KalturaServiceBase def initialize(client) super(client) end # Aborts the bulk upload and all its child jobs # @return [KalturaBulkUpload] def abort(id) kparams = {} client.add_param(kparams, 'id', id) client.queue_service_action_call('bulkupload_bulk', 'abort', 'KalturaBulkUpload', kparams) if (client.is_multirequest) return nil end return client.do_queue() end # Get bulk upload batch job by id # @return [KalturaBulkUpload] def get(id) kparams = {} client.add_param(kparams, 'id', id) client.queue_service_action_call('bulkupload_bulk', 'get', 'KalturaBulkUpload', kparams) if (client.is_multirequest) return nil end return client.do_queue() end # List bulk upload batch jobs # @return [KalturaBulkUploadListResponse] def list(bulk_upload_filter=KalturaNotImplemented, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'bulkUploadFilter', bulk_upload_filter) client.add_param(kparams, 'pager', pager) client.queue_service_action_call('bulkupload_bulk', 'list', 'KalturaBulkUploadListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end # serve action returns the original file. # @return [file] def serve(id) kparams = {} client.add_param(kparams, 'id', id) client.queue_service_action_call('bulkupload_bulk', 'serve', 'file', kparams) return client.get_serve_url() end # serveLog action returns the log file for the bulk-upload job. # @return [file] def serve_log(id) kparams = {} client.add_param(kparams, 'id', id) client.queue_service_action_call('bulkupload_bulk', 'serveLog', 'file', kparams) return client.get_serve_url() end end class KalturaClient < KalturaClientBase attr_reader :bulk_service def bulk_service if (@bulk_service == nil) @bulk_service = KalturaBulkService.new(self) end return @bulk_service end end end