Class: Kaltura::KalturaBulkService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb

Overview

Bulk upload service is used to upload & manage bulk uploads

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaBulkService

Returns a new instance of KalturaBulkService.



36
37
38
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 36

def initialize(client)
	super(client)
end

Instance Method Details

#abort(id) ⇒ Object

Aborts the bulk upload and all its child jobs



87
88
89
90
91
92
93
94
95
96
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 87

def abort(id)
	kparams = {}
	# job id
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('bulkupload_bulk', 'abort', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get(id) ⇒ Object

Get bulk upload batch job by id



42
43
44
45
46
47
48
49
50
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 42

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

#list(bulk_upload_filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object

List bulk upload batch jobs



54
55
56
57
58
59
60
61
62
63
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 54

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', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#serve(id) ⇒ Object

serve action returns the original file.



67
68
69
70
71
72
73
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 67

def serve(id)
	kparams = {}
	# job id
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('bulkupload_bulk', 'serve', kparams);
	return client.get_serve_url();
end

#serve_log(id) ⇒ Object

serveLog action returns the log file for the bulk-upload job.



77
78
79
80
81
82
83
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 77

def serve_log(id)
	kparams = {}
	# job id
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('bulkupload_bulk', 'serveLog', kparams);
	return client.get_serve_url();
end