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.



141
142
143
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 141

def initialize(client)
	super(client)
end

Instance Method Details

#add(entry) ⇒ KalturaExternalMediaEntry

Add external media entry



147
148
149
150
151
152
153
154
155
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 147

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

#count(filter = KalturaNotImplemented) ⇒ int

Count media entries by filter.

Returns:

  • (int)


159
160
161
162
163
164
165
166
167
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 159

def count(filter=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.queue_service_action_call('externalmedia_externalmedia', 'count', 'int', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(id) ⇒ Object

Delete a external media entry.

Returns:



171
172
173
174
175
176
177
178
179
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 171

def delete(id)
	kparams = {}
	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) ⇒ KalturaExternalMediaEntry

Get external media entry by ID.



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

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

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

List media entries by filter with paging support.



195
196
197
198
199
200
201
202
203
204
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 195

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

#update(id, entry) ⇒ KalturaExternalMediaEntry

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



208
209
210
211
212
213
214
215
216
217
# File 'lib/kaltura_plugins/kaltura_external_media_client_plugin.rb', line 208

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