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.
342 343 344 |
# File 'lib/kaltura_client.rb', line 342 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.
348 349 350 351 352 353 354 355 356 357 |
# File 'lib/kaltura_client.rb', line 348 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
361 362 363 364 365 366 367 368 369 370 |
# File 'lib/kaltura_client.rb', line 361 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.
374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/kaltura_client.rb', line 374 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.
388 389 390 391 392 393 394 395 396 397 |
# File 'lib/kaltura_client.rb', line 388 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).
401 402 403 404 405 406 407 408 409 |
# File 'lib/kaltura_client.rb', line 401 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
413 414 415 416 417 418 419 420 421 422 |
# File 'lib/kaltura_client.rb', line 413 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.
426 427 428 429 430 431 432 433 434 |
# File 'lib/kaltura_client.rb', line 426 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.
438 439 440 441 442 443 444 445 446 |
# File 'lib/kaltura_client.rb', line 438 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
449 450 451 452 453 454 455 456 457 458 |
# File 'lib/kaltura_client.rb', line 449 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.
462 463 464 465 466 467 468 469 470 |
# File 'lib/kaltura_client.rb', line 462 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.
474 475 476 477 478 479 480 481 482 483 |
# File 'lib/kaltura_client.rb', line 474 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.
487 488 489 490 491 492 493 494 495 |
# File 'lib/kaltura_client.rb', line 487 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.
499 500 501 502 503 504 505 506 507 508 |
# File 'lib/kaltura_client.rb', line 499 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
512 513 514 515 516 517 518 519 520 521 |
# File 'lib/kaltura_client.rb', line 512 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.
525 526 527 528 529 530 531 532 533 |
# File 'lib/kaltura_client.rb', line 525 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.
537 538 539 540 541 542 543 544 545 546 |
# File 'lib/kaltura_client.rb', line 537 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.
550 551 552 553 554 555 556 557 558 559 |
# File 'lib/kaltura_client.rb', line 550 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
563 564 565 566 567 568 569 570 571 572 |
# File 'lib/kaltura_client.rb', line 563 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.
576 577 578 579 580 581 582 583 584 585 |
# File 'lib/kaltura_client.rb', line 576 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).
589 590 591 592 593 594 595 596 597 |
# File 'lib/kaltura_client.rb', line 589 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.
601 602 603 604 605 606 607 608 609 610 |
# File 'lib/kaltura_client.rb', line 601 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.
614 615 616 617 618 619 620 621 622 623 624 625 |
# File 'lib/kaltura_client.rb', line 614 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).
629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/kaltura_client.rb', line 629 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.
643 644 645 646 647 648 649 650 651 652 |
# File 'lib/kaltura_client.rb', line 643 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.
656 657 658 659 660 661 662 663 664 665 666 |
# File 'lib/kaltura_client.rb', line 656 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.
670 671 672 673 674 675 676 677 678 679 |
# File 'lib/kaltura_client.rb', line 670 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 |