Class: Kaltura::KalturaAnnotationService

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

Overview

Annotation service - Video Annotation

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaAnnotationService

Returns a new instance of KalturaAnnotationService.



214
215
216
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 214

def initialize(client)
	super(client)
end

Instance Method Details

#add(annotation) ⇒ KalturaAnnotation

Allows you to add an annotation object associated with an entry

Returns:



220
221
222
223
224
225
226
227
228
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 220

def add(annotation)
	kparams = {}
	client.add_param(kparams, 'annotation', annotation)
	client.queue_service_action_call('annotation_annotation', 'add', 'KalturaAnnotation', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#add_from_bulk(file_data) ⇒ KalturaCuePointListResponse

Allows you to add multiple cue points objects by uploading XML that contains multiple cue point definitions



232
233
234
235
236
237
238
239
240
241
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 232

def add_from_bulk(file_data)
	kparams = {}
	kfiles = {}
	client.add_param(kfiles, 'fileData', file_data)
	client.queue_service_action_call('annotation_annotation', 'addFromBulk', 'KalturaCuePointListResponse', kparams, kfiles)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#clone(id, entry_id, parent_id = KalturaNotImplemented) ⇒ KalturaAnnotation

Clone cuePoint with id to given entry

Returns:



245
246
247
248
249
250
251
252
253
254
255
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 245

def clone(id, entry_id, parent_id=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'parentId', parent_id)
	client.queue_service_action_call('annotation_annotation', 'clone', 'KalturaAnnotation', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#count(filter = KalturaNotImplemented) ⇒ int

count cue point objects by filter

Returns:

  • (int)


259
260
261
262
263
264
265
266
267
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 259

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

#delete(id) ⇒ Object

delete cue point by id, and delete all children cue points

Returns:



271
272
273
274
275
276
277
278
279
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 271

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

#get(id) ⇒ KalturaCuePoint

Retrieve an CuePoint object by id

Returns:



283
284
285
286
287
288
289
290
291
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 283

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

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

List annotation objects by filter and pager



295
296
297
298
299
300
301
302
303
304
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 295

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

#serve_bulk(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ file

Download multiple cue points objects as XML definitions

Returns:

  • (file)


308
309
310
311
312
313
314
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 308

def serve_bulk(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('annotation_annotation', 'serveBulk', 'file', kparams)
	return client.get_serve_url()
end

#update(id, annotation) ⇒ KalturaAnnotation

Update annotation by id

Returns:



318
319
320
321
322
323
324
325
326
327
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 318

def update(id, annotation)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'annotation', annotation)
	client.queue_service_action_call('annotation_annotation', 'update', 'KalturaAnnotation', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update_cue_points_times(id, start_time, end_time = KalturaNotImplemented) ⇒ KalturaCuePoint

Returns:



330
331
332
333
334
335
336
337
338
339
340
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 330

def update_cue_points_times(id, start_time, end_time=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'startTime', start_time)
	client.add_param(kparams, 'endTime', end_time)
	client.queue_service_action_call('annotation_annotation', 'updateCuePointsTimes', 'KalturaCuePoint', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update_status(id, status) ⇒ Object

Update cuePoint status by id

Returns:



344
345
346
347
348
349
350
351
352
353
# File 'lib/kaltura_plugins/kaltura_annotation_client_plugin.rb', line 344

def update_status(id, status)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'status', status)
	client.queue_service_action_call('annotation_annotation', 'updateStatus', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end