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
-
#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).
-
#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 |
#flag(moderation_flag) ⇒ Object
Flag inappropriate entry for moderation.
463 464 465 466 467 468 469 470 471 |
# File 'lib/kaltura_client.rb', line 463 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.
475 476 477 478 479 480 481 482 483 484 |
# File 'lib/kaltura_client.rb', line 475 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.
488 489 490 491 492 493 494 495 496 |
# File 'lib/kaltura_client.rb', line 488 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.
500 501 502 503 504 505 506 507 508 509 |
# File 'lib/kaltura_client.rb', line 500 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
513 514 515 516 517 518 519 520 521 522 |
# File 'lib/kaltura_client.rb', line 513 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.
526 527 528 529 530 531 532 533 534 |
# File 'lib/kaltura_client.rb', line 526 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.
538 539 540 541 542 543 544 545 546 547 |
# File 'lib/kaltura_client.rb', line 538 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.
551 552 553 554 555 556 557 558 559 560 |
# File 'lib/kaltura_client.rb', line 551 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
564 565 566 567 568 569 570 571 572 573 |
# File 'lib/kaltura_client.rb', line 564 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.
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).
590 591 592 593 594 595 596 597 598 |
# File 'lib/kaltura_client.rb', line 590 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) ⇒ KalturaBaseEntry
Update base entry. Only the properties that were set will be updated.
602 603 604 605 606 607 608 609 610 611 |
# File 'lib/kaltura_client.rb', line 602 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.
615 616 617 618 619 620 621 622 623 624 625 626 |
# File 'lib/kaltura_client.rb', line 615 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).
630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/kaltura_client.rb', line 630 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.
644 645 646 647 648 649 650 651 652 653 |
# File 'lib/kaltura_client.rb', line 644 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.
657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/kaltura_client.rb', line 657 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.
671 672 673 674 675 676 677 678 679 680 |
# File 'lib/kaltura_client.rb', line 671 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 |