Class: Kaltura::KalturaBulkUploadService

Inherits:
KalturaServiceBase show all
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

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaBulkUploadService

Returns a new instance of KalturaBulkUploadService.



711
712
713
# File 'lib/kaltura_client.rb', line 711

def initialize(client)
	super(client)
end

Instance Method Details

#abort(id) ⇒ KalturaBulkUpload

Aborts the bulk upload and all its child jobs

Returns:



717
718
719
720
721
722
723
724
725
# File 'lib/kaltura_client.rb', line 717

def abort(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('bulkupload', 'abort', 'KalturaBulkUpload', 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) ⇒ KalturaBulkUpload

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

Returns:



731
732
733
734
735
736
737
738
739
740
741
742
743
744
# File 'lib/kaltura_client.rb', line 731

def add(conversion_profile_id, csv_file_data, bulk_upload_type=KalturaNotImplemented, uploaded_by=KalturaNotImplemented, file_name=KalturaNotImplemented)
	kparams = {}
	kfiles = {}
	client.add_param(kparams, 'conversionProfileId', conversion_profile_id)
	client.add_param(kfiles, 'csvFileData', csv_file_data)
	client.add_param(kparams, 'bulkUploadType', bulk_upload_type)
	client.add_param(kparams, 'uploadedBy', uploaded_by)
	client.add_param(kparams, 'fileName', file_name)
	client.queue_service_action_call('bulkupload', 'add', 'KalturaBulkUpload', kparams, kfiles)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(id) ⇒ KalturaBulkUpload

Get bulk upload batch job by id

Returns:



748
749
750
751
752
753
754
755
756
# File 'lib/kaltura_client.rb', line 748

def get(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('bulkupload', 'get', 'KalturaBulkUpload', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#list(pager = KalturaNotImplemented) ⇒ KalturaBulkUploadListResponse

List bulk upload batch jobs



760
761
762
763
764
765
766
767
768
# File 'lib/kaltura_client.rb', line 760

def list(pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('bulkupload', 'list', 'KalturaBulkUploadListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#serve(id) ⇒ file

serve action return the original file.

Returns:

  • (file)


772
773
774
775
776
777
# File 'lib/kaltura_client.rb', line 772

def serve(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('bulkupload', 'serve', 'file', kparams)
	return client.get_serve_url()
end

#serve_log(id) ⇒ file

serveLog action return the original file.

Returns:

  • (file)


781
782
783
784
785
786
# File 'lib/kaltura_client.rb', line 781

def serve_log(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('bulkupload', 'serveLog', 'file', kparams)
	return client.get_serve_url()
end