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) ⇒ KalturaBaseEntry
Generic add entry, should be used when the uploaded entry type is not known.
-
#add_content(entry_id, resource) ⇒ KalturaBaseEntry
Attach content resource to entry in status NO_MEDIA.
-
#add_from_uploaded_file(entry, upload_token_id, type = KalturaNotImplemented) ⇒ KalturaBaseEntry
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, clone_options = KalturaNotImplemented) ⇒ KalturaBaseEntry
Clone an entry with optional attributes to apply to the clone.
-
#count(filter = KalturaNotImplemented) ⇒ int
Count base entries by filter.
-
#delete(entry_id) ⇒ Object
Delete an entry.
- #export(entry_id, storage_profile_id) ⇒ KalturaBaseEntry
-
#export_to_csv(filter = KalturaNotImplemented, metadata_profile_id = KalturaNotImplemented, additional_fields = KalturaNotImplemented, mapped_fields = KalturaNotImplemented, options = KalturaNotImplemented) ⇒ string
add batch job that sends an email with a link to download an updated CSV that contains list of entries.
-
#flag(moderation_flag) ⇒ Object
Flag inappropriate entry for moderation.
-
#get(entry_id, version = -1)) ⇒ KalturaBaseEntry
Get base entry by ID.
-
#get_by_ids(entry_ids) ⇒ array
Get an array of KalturaBaseEntry objects by a comma-separated list of ids.
-
#get_context_data(entry_id, context_data_params) ⇒ KalturaEntryContextDataResult
This action delivers entry-related data, based on the user’s context: access control, restriction, playback format and storage information.
-
#get_playback_context(entry_id, context_data_params) ⇒ KalturaPlaybackContext
This action delivers all data relevant for player.
-
#get_remote_paths(entry_id) ⇒ KalturaRemotePathListResponse
Get remote storage existing paths for the asset.
-
#index(id, should_update = true) ⇒ int
Index an entry by id.
-
#initialize(client) ⇒ KalturaBaseEntryService
constructor
A new instance of KalturaBaseEntryService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaBaseEntryListResponse
List base entries by filter with paging support.
-
#list_by_reference_id(ref_id, pager = KalturaNotImplemented) ⇒ KalturaBaseEntryListResponse
List base entries by filter according to reference id.
-
#list_flags(entry_id, pager = KalturaNotImplemented) ⇒ KalturaModerationFlagListResponse
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).
-
#serve_playback_key(entry_id) ⇒ file
This action serves HLS encrypted key if access control is validated.
-
#update(entry_id, base_entry) ⇒ KalturaBaseEntry
Update base entry.
-
#update_content(entry_id, resource, conversion_profile_id = KalturaNotImplemented, advanced_options = KalturaNotImplemented) ⇒ KalturaBaseEntry
Update the content resource associated with the entry.
-
#update_thumbnail_from_source_entry(entry_id, source_entry_id, time_offset) ⇒ KalturaBaseEntry
Update entry thumbnail from a different entry by a specified time offset (in seconds).
-
#update_thumbnail_from_url(entry_id, url) ⇒ KalturaBaseEntry
Update entry thumbnail using URL.
-
#update_thumbnail_jpeg(entry_id, file_data) ⇒ KalturaBaseEntry
Update entry thumbnail using a raw jpeg file.
-
#upload(file_data) ⇒ string
Upload a file to Kaltura, that can be used to create an entry.
Constructor Details
#initialize(client) ⇒ KalturaBaseEntryService
Returns a new instance of KalturaBaseEntryService.
343 344 345 |
# File 'lib/kaltura_client.rb', line 343 def initialize(client) super(client) end |
Instance Method Details
#add(entry, type = KalturaNotImplemented) ⇒ KalturaBaseEntry
Generic add entry, should be used when the uploaded entry type is not known.
349 350 351 352 353 354 355 356 357 358 |
# File 'lib/kaltura_client.rb', line 349 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) ⇒ KalturaBaseEntry
Attach content resource to entry in status NO_MEDIA
362 363 364 365 366 367 368 369 370 371 |
# File 'lib/kaltura_client.rb', line 362 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) ⇒ KalturaBaseEntry
Generic add entry using an uploaded file, should be used when the uploaded entry type is not known.
375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/kaltura_client.rb', line 375 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.
389 390 391 392 393 394 395 396 397 398 |
# File 'lib/kaltura_client.rb', line 389 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).
402 403 404 405 406 407 408 409 410 |
# File 'lib/kaltura_client.rb', line 402 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, clone_options = KalturaNotImplemented) ⇒ KalturaBaseEntry
Clone an entry with optional attributes to apply to the clone
414 415 416 417 418 419 420 421 422 423 |
# File 'lib/kaltura_client.rb', line 414 def clone(entry_id, =KalturaNotImplemented) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.add_param(kparams, 'cloneOptions', ) client.queue_service_action_call('baseentry', 'clone', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#count(filter = KalturaNotImplemented) ⇒ int
Count base entries by filter.
427 428 429 430 431 432 433 434 435 |
# File 'lib/kaltura_client.rb', line 427 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.
439 440 441 442 443 444 445 446 447 |
# File 'lib/kaltura_client.rb', line 439 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) ⇒ KalturaBaseEntry
450 451 452 453 454 455 456 457 458 459 |
# File 'lib/kaltura_client.rb', line 450 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 |
#export_to_csv(filter = KalturaNotImplemented, metadata_profile_id = KalturaNotImplemented, additional_fields = KalturaNotImplemented, mapped_fields = KalturaNotImplemented, options = KalturaNotImplemented) ⇒ string
add batch job that sends an email with a link to download an updated CSV that contains list of entries
463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/kaltura_client.rb', line 463 def export_to_csv(filter=KalturaNotImplemented, =KalturaNotImplemented, additional_fields=KalturaNotImplemented, mapped_fields=KalturaNotImplemented, =KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter) client.add_param(kparams, 'metadataProfileId', ) client.add_param(kparams, 'additionalFields', additional_fields) client.add_param(kparams, 'mappedFields', mapped_fields) client.add_param(kparams, 'options', ) client.queue_service_action_call('baseentry', 'exportToCsv', 'string', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#flag(moderation_flag) ⇒ Object
Flag inappropriate entry for moderation.
479 480 481 482 483 484 485 486 487 |
# File 'lib/kaltura_client.rb', line 479 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)) ⇒ KalturaBaseEntry
Get base entry by ID.
491 492 493 494 495 496 497 498 499 500 |
# File 'lib/kaltura_client.rb', line 491 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) ⇒ array
Get an array of KalturaBaseEntry objects by a comma-separated list of ids.
504 505 506 507 508 509 510 511 512 |
# File 'lib/kaltura_client.rb', line 504 def get_by_ids(entry_ids) kparams = {} client.add_param(kparams, 'entryIds', entry_ids) client.queue_service_action_call('baseentry', 'getByIds', 'KalturaBaseEntry', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get_context_data(entry_id, context_data_params) ⇒ KalturaEntryContextDataResult
This action delivers entry-related data, based on the user’s context: access control, restriction, playback format and storage information.
516 517 518 519 520 521 522 523 524 525 |
# File 'lib/kaltura_client.rb', line 516 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_playback_context(entry_id, context_data_params) ⇒ KalturaPlaybackContext
This action delivers all data relevant for player
529 530 531 532 533 534 535 536 537 538 |
# File 'lib/kaltura_client.rb', line 529 def get_playback_context(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', 'getPlaybackContext', 'KalturaPlaybackContext', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get_remote_paths(entry_id) ⇒ KalturaRemotePathListResponse
Get remote storage existing paths for the asset.
542 543 544 545 546 547 548 549 550 |
# File 'lib/kaltura_client.rb', line 542 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) ⇒ int
Index an entry by id.
554 555 556 557 558 559 560 561 562 563 |
# File 'lib/kaltura_client.rb', line 554 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) ⇒ KalturaBaseEntryListResponse
List base entries by filter with paging support.
567 568 569 570 571 572 573 574 575 576 |
# File 'lib/kaltura_client.rb', line 567 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) ⇒ KalturaBaseEntryListResponse
List base entries by filter according to reference id
580 581 582 583 584 585 586 587 588 589 |
# File 'lib/kaltura_client.rb', line 580 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) ⇒ KalturaModerationFlagListResponse
List all pending flags for the entry.
593 594 595 596 597 598 599 600 601 602 |
# File 'lib/kaltura_client.rb', line 593 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).
606 607 608 609 610 611 612 613 614 |
# File 'lib/kaltura_client.rb', line 606 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 |
#serve_playback_key(entry_id) ⇒ file
This action serves HLS encrypted key if access control is validated
618 619 620 621 622 623 |
# File 'lib/kaltura_client.rb', line 618 def serve_playback_key(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id) client.queue_service_action_call('baseentry', 'servePlaybackKey', 'file', kparams) return client.get_serve_url() end |
#update(entry_id, base_entry) ⇒ KalturaBaseEntry
Update base entry. Only the properties that were set will be updated.
627 628 629 630 631 632 633 634 635 636 |
# File 'lib/kaltura_client.rb', line 627 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) ⇒ KalturaBaseEntry
Update the content resource associated with the entry.
640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/kaltura_client.rb', line 640 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) ⇒ KalturaBaseEntry
Update entry thumbnail from a different entry by a specified time offset (in seconds).
655 656 657 658 659 660 661 662 663 664 665 |
# File 'lib/kaltura_client.rb', line 655 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) ⇒ KalturaBaseEntry
Update entry thumbnail using URL.
669 670 671 672 673 674 675 676 677 678 |
# File 'lib/kaltura_client.rb', line 669 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) ⇒ KalturaBaseEntry
Update entry thumbnail using a raw jpeg file.
682 683 684 685 686 687 688 689 690 691 692 |
# File 'lib/kaltura_client.rb', line 682 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) ⇒ string
Upload a file to Kaltura, that can be used to create an entry.
696 697 698 699 700 701 702 703 704 705 |
# File 'lib/kaltura_client.rb', line 696 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 |