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.



11330
11331
11332
# File 'lib/kaltura_client.rb', line 11330

def initialize(client)
	super(client)
end

Instance Method Details

#abort(id) ⇒ Object

Aborts the bulk upload and all its child jobs



11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
# File 'lib/kaltura_client.rb', line 11401

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



11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
# File 'lib/kaltura_client.rb', line 11338

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



11357
11358
11359
11360
11361
11362
11363
11364
11365
# File 'lib/kaltura_client.rb', line 11357

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



11369
11370
11371
11372
11373
11374
11375
11376
11377
# File 'lib/kaltura_client.rb', line 11369

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.



11381
11382
11383
11384
11385
11386
11387
# File 'lib/kaltura_client.rb', line 11381

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.



11391
11392
11393
11394
11395
11396
11397
# File 'lib/kaltura_client.rb', line 11391

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