Class: Kaltura::KalturaExternalMediaService

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

Overview

External media service lets you upload and manage embed codes and external playable content

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaExternalMediaService

Returns a new instance of KalturaExternalMediaService.



107
108
109
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 107

def initialize(client)
	super(client)
end

Instance Method Details

#add(entry) ⇒ Object

Add external media entry



113
114
115
116
117
118
119
120
121
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 113

def add(entry)
	kparams = {}
	client.add_param(kparams, 'entry', entry);
	client.queue_service_action_call('externalmedia_externalmedia', 'add', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#count(filter = KalturaNotImplemented) ⇒ Object

Count media entries by filter.



181
182
183
184
185
186
187
188
189
190
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 181

def count(filter=KalturaNotImplemented)
	kparams = {}
	# External media entry filter
	client.add_param(kparams, 'filter', filter);
	client.queue_service_action_call('externalmedia_externalmedia', 'count', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#delete(id) ⇒ Object

Delete a external media entry.



153
154
155
156
157
158
159
160
161
162
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 153

def delete(id)
	kparams = {}
	# External media entry id to delete
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('externalmedia_externalmedia', 'delete', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get(id) ⇒ Object

Get external media entry by ID.



125
126
127
128
129
130
131
132
133
134
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 125

def get(id)
	kparams = {}
	# External media entry id
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('externalmedia_externalmedia', 'get', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

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

List media entries by filter with paging support.



166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 166

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	# External media entry filter
	client.add_param(kparams, 'filter', filter);
	# Pager
	client.add_param(kparams, 'pager', pager);
	client.queue_service_action_call('externalmedia_externalmedia', 'list', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#update(id, entry) ⇒ Object

Update external media entry. Only the properties that were set will be updated.



138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 138

def update(id, entry)
	kparams = {}
	# External media entry id to update
	client.add_param(kparams, 'id', id);
	# External media entry object to update
	client.add_param(kparams, 'entry', entry);
	client.queue_service_action_call('externalmedia_externalmedia', 'update', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end