Class: Kaltura::KalturaBaseEntryService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaBaseEntryService
- Defined in:
- lib/kaltura_client.rb
Overview
Base Entry Service
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(entry, type = KalturaNotImplemented) ⇒ Object
Generic add entry, should be used when the uploaded entry type is not known.
-
#add_content(entry_id, resource) ⇒ Object
Attach content resource to entry in status NO_MEDIA.
-
#add_from_uploaded_file(entry, upload_token_id, type = KalturaNotImplemented) ⇒ Object
Generic add entry using an uploaded file, should be used when the uploaded entry type is not known.
-
#anonymous_rank(entry_id, rank) ⇒ Object
Anonymously rank an entry, no validation is done on duplicate rankings.
-
#approve(entry_id) ⇒ Object
Approve the entry and mark the pending flags (if any) as moderated (this will make the entry playable).
-
#clone(entry_id) ⇒ Object
Clone an entry with optional attributes to apply to the clone.
-
#count(filter = KalturaNotImplemented) ⇒ Object
Count base entries by filter.
-
#delete(entry_id) ⇒ Object
Delete an entry.
- #export(entry_id, storage_profile_id) ⇒ Object
-
#flag(moderation_flag) ⇒ Object
Flag inappropriate entry for moderation.
-
#get(entry_id, version = -1)) ⇒ Object
Get base entry by ID.
-
#get_by_ids(entry_ids) ⇒ Object
Get an array of KalturaBaseEntry objects by a comma-separated list of ids.
-
#get_context_data(entry_id, context_data_params) ⇒ Object
This action delivers entry-related data, based on the user’s context: access control, restriction, playback format and storage information.
-
#get_remote_paths(entry_id) ⇒ Object
Get remote storage existing paths for the asset.
-
#index(id, should_update = true) ⇒ Object
Index an entry by id.
-
#initialize(client) ⇒ KalturaBaseEntryService
constructor
A new instance of KalturaBaseEntryService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List base entries by filter with paging support.
-
#list_by_reference_id(ref_id, pager = KalturaNotImplemented) ⇒ Object
List base entries by filter according to reference id.
-
#list_flags(entry_id, pager = KalturaNotImplemented) ⇒ Object
List all pending flags for the entry.
-
#reject(entry_id) ⇒ Object
Reject the entry and mark the pending flags (if any) as moderated (this will make the entry non-playable).
-
#update(entry_id, base_entry) ⇒ Object
Update base entry.
-
#update_content(entry_id, resource, conversion_profile_id = KalturaNotImplemented, advanced_options = KalturaNotImplemented) ⇒ Object
Update the content resource associated with the entry.
-
#update_thumbnail_from_source_entry(entry_id, source_entry_id, time_offset) ⇒ Object
Update entry thumbnail from a different entry by a specified time offset (in seconds).
-
#update_thumbnail_from_url(entry_id, url) ⇒ Object
Update entry thumbnail using url.
-
#update_thumbnail_jpeg(entry_id, file_data) ⇒ Object
Update entry thumbnail using a raw jpeg file.
-
#upload(file_data) ⇒ Object
Upload a file to Kaltura, that can be used to create an entry.
Constructor Details
#initialize(client) ⇒ KalturaBaseEntryService
Returns a new instance of KalturaBaseEntryService.
326 327 328 |
# File 'lib/kaltura_client.rb', line 326 def initialize(client) super(client) end |
Instance Method Details
#add(entry, type = KalturaNotImplemented) ⇒ Object
Generic add entry, should be used when the uploaded entry type is not known.
332 333 334 335 336 337 338 339 340 341 |
# File 'lib/kaltura_client.rb', line 332 def add(entry, type=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'entry', entry) client.add_param(kparams, 'type', type) client.queue_service_action_call('baseentry', 'add', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#add_content(entry_id, resource) ⇒ Object
Attach content resource to entry in status NO_MEDIA
345 346 347 348 349 350 351 352 353 354 |
# File 'lib/kaltura_client.rb', line 345 def add_content(entry_id, resource) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'resource', resource) client.queue_service_action_call('baseentry', 'addContent', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#add_from_uploaded_file(entry, upload_token_id, type = KalturaNotImplemented) ⇒ Object
Generic add entry using an uploaded file, should be used when the uploaded entry type is not known.
358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/kaltura_client.rb', line 358 def add_from_uploaded_file(entry, upload_token_id, type=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'entry', entry) client.add_param(kparams, 'uploadTokenId', upload_token_id) client.add_param(kparams, 'type', type) client.queue_service_action_call('baseentry', 'addFromUploadedFile', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#anonymous_rank(entry_id, rank) ⇒ Object
Anonymously rank an entry, no validation is done on duplicate rankings.
590 591 592 593 594 595 596 597 598 599 |
# File 'lib/kaltura_client.rb', line 590 def anonymous_rank(entry_id, rank) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'rank', rank) client.queue_service_action_call('baseentry', 'anonymousRank', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#approve(entry_id) ⇒ Object
Approve the entry and mark the pending flags (if any) as moderated (this will make the entry playable).
565 566 567 568 569 570 571 572 573 |
# File 'lib/kaltura_client.rb', line 565 def approve(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.queue_service_action_call('baseentry', 'approve', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#clone(entry_id) ⇒ Object
Clone an entry with optional attributes to apply to the clone
640 641 642 643 644 645 646 647 648 |
# File 'lib/kaltura_client.rb', line 640 def clone(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.queue_service_action_call('baseentry', 'clone', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#count(filter = KalturaNotImplemented) ⇒ Object
Count base entries by filter.
475 476 477 478 479 480 481 482 483 |
# File 'lib/kaltura_client.rb', line 475 def count(filter=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter) client.queue_service_action_call('baseentry', 'count', 'int', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#delete(entry_id) ⇒ Object
Delete an entry.
437 438 439 440 441 442 443 444 445 |
# File 'lib/kaltura_client.rb', line 437 def delete(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.queue_service_action_call('baseentry', 'delete', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#export(entry_id, storage_profile_id) ⇒ Object
614 615 616 617 618 619 620 621 622 623 |
# File 'lib/kaltura_client.rb', line 614 def export(entry_id, storage_profile_id) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'storageProfileId', storage_profile_id) client.queue_service_action_call('baseentry', 'export', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#flag(moderation_flag) ⇒ Object
Flag inappropriate entry for moderation.
541 542 543 544 545 546 547 548 549 |
# File 'lib/kaltura_client.rb', line 541 def flag(moderation_flag) kparams = {} client.add_param(kparams, 'moderationFlag', moderation_flag) client.queue_service_action_call('baseentry', 'flag', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get(entry_id, version = -1)) ⇒ Object
Get base entry by ID.
372 373 374 375 376 377 378 379 380 381 |
# File 'lib/kaltura_client.rb', line 372 def get(entry_id, version=-1) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'version', version) client.queue_service_action_call('baseentry', 'get', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get_by_ids(entry_ids) ⇒ Object
Get an array of KalturaBaseEntry objects by a comma-separated list of ids.
425 426 427 428 429 430 431 432 433 |
# File 'lib/kaltura_client.rb', line 425 def get_by_ids(entry_ids) kparams = {} client.add_param(kparams, 'entryIds', entry_ids) client.queue_service_action_call('baseentry', 'getByIds', 'array', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get_context_data(entry_id, context_data_params) ⇒ Object
This action delivers entry-related data, based on the user’s context: access control, restriction, playback format and storage information.
603 604 605 606 607 608 609 610 611 612 |
# File 'lib/kaltura_client.rb', line 603 def get_context_data(entry_id, context_data_params) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'contextDataParams', context_data_params) client.queue_service_action_call('baseentry', 'getContextData', 'KalturaEntryContextDataResult', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get_remote_paths(entry_id) ⇒ Object
Get remote storage existing paths for the asset.
385 386 387 388 389 390 391 392 393 |
# File 'lib/kaltura_client.rb', line 385 def get_remote_paths(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.queue_service_action_call('baseentry', 'getRemotePaths', 'KalturaRemotePathListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#index(id, should_update = true) ⇒ Object
Index an entry by id.
627 628 629 630 631 632 633 634 635 636 |
# File 'lib/kaltura_client.rb', line 627 def index(id, should_update=true) kparams = {} client.add_param(kparams, 'id', id) client.add_param(kparams, 'shouldUpdate', should_update) client.queue_service_action_call('baseentry', 'index', 'int', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List base entries by filter with paging support.
449 450 451 452 453 454 455 456 457 458 |
# File 'lib/kaltura_client.rb', line 449 def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter) client.add_param(kparams, 'pager', pager) client.queue_service_action_call('baseentry', 'list', 'KalturaBaseEntryListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#list_by_reference_id(ref_id, pager = KalturaNotImplemented) ⇒ Object
List base entries by filter according to reference id
462 463 464 465 466 467 468 469 470 471 |
# File 'lib/kaltura_client.rb', line 462 def list_by_reference_id(ref_id, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'refId', ref_id) client.add_param(kparams, 'pager', pager) client.queue_service_action_call('baseentry', 'listByReferenceId', 'KalturaBaseEntryListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#list_flags(entry_id, pager = KalturaNotImplemented) ⇒ Object
List all pending flags for the entry.
577 578 579 580 581 582 583 584 585 586 |
# File 'lib/kaltura_client.rb', line 577 def list_flags(entry_id, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'pager', pager) client.queue_service_action_call('baseentry', 'listFlags', 'KalturaModerationFlagListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#reject(entry_id) ⇒ Object
Reject the entry and mark the pending flags (if any) as moderated (this will make the entry non-playable).
553 554 555 556 557 558 559 560 561 |
# File 'lib/kaltura_client.rb', line 553 def reject(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.queue_service_action_call('baseentry', 'reject', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update(entry_id, base_entry) ⇒ Object
Update base entry. Only the properties that were set will be updated.
397 398 399 400 401 402 403 404 405 406 |
# File 'lib/kaltura_client.rb', line 397 def update(entry_id, base_entry) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'baseEntry', base_entry) client.queue_service_action_call('baseentry', 'update', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update_content(entry_id, resource, conversion_profile_id = KalturaNotImplemented, advanced_options = KalturaNotImplemented) ⇒ Object
Update the content resource associated with the entry.
410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/kaltura_client.rb', line 410 def update_content(entry_id, resource, conversion_profile_id=KalturaNotImplemented, =KalturaNotImplemented) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'resource', resource) client.add_param(kparams, 'conversionProfileId', conversion_profile_id) client.add_param(kparams, 'advancedOptions', ) client.queue_service_action_call('baseentry', 'updateContent', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update_thumbnail_from_source_entry(entry_id, source_entry_id, time_offset) ⇒ Object
Update entry thumbnail from a different entry by a specified time offset (in seconds).
527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/kaltura_client.rb', line 527 def update_thumbnail_from_source_entry(entry_id, source_entry_id, time_offset) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'sourceEntryId', source_entry_id) client.add_param(kparams, 'timeOffset', time_offset) client.queue_service_action_call('baseentry', 'updateThumbnailFromSourceEntry', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update_thumbnail_from_url(entry_id, url) ⇒ Object
Update entry thumbnail using url.
514 515 516 517 518 519 520 521 522 523 |
# File 'lib/kaltura_client.rb', line 514 def update_thumbnail_from_url(entry_id, url) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'url', url) client.queue_service_action_call('baseentry', 'updateThumbnailFromUrl', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update_thumbnail_jpeg(entry_id, file_data) ⇒ Object
Update entry thumbnail using a raw jpeg file.
500 501 502 503 504 505 506 507 508 509 510 |
# File 'lib/kaltura_client.rb', line 500 def update_thumbnail_jpeg(entry_id, file_data) kparams = {} kfiles = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kfiles, 'fileData', file_data) client.queue_service_action_call('baseentry', 'updateThumbnailJpeg', 'KalturaBaseEntry', kparams, kfiles) if (client.is_multirequest) return nil end return client.do_queue() end |
#upload(file_data) ⇒ Object
Upload a file to Kaltura, that can be used to create an entry.
487 488 489 490 491 492 493 494 495 496 |
# File 'lib/kaltura_client.rb', line 487 def upload(file_data) kparams = {} kfiles = {} client.add_param(kfiles, 'fileData', file_data) client.queue_service_action_call('baseentry', 'upload', 'string', kparams, kfiles) if (client.is_multirequest) return nil end return client.do_queue() end |