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.



46
47
48
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 46

def initialize(client)
	super(client)
end

Instance Method Details

#abort(id) ⇒ KalturaBulkUpload

Aborts the bulk upload and all its child jobs

Returns:



52
53
54
55
56
57
58
59
60
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 52

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(id) ⇒ KalturaBulkUpload

Get bulk upload batch job by id

Returns:



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

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_filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaBulkUploadListResponse

List bulk upload batch jobs



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

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(id) ⇒ file

serve action returns the original file.

Returns:

  • (file)


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

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

#serve_log(id) ⇒ file

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

Returns:

  • (file)


98
99
100
101
102
103
# File 'lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb', line 98

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