Class: Kaltura::KalturaCategoryEntryService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Overview

Add & Manage CategoryEntry - assign entry to category

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaCategoryEntryService

Returns a new instance of KalturaCategoryEntryService.



765
766
767
# File 'lib/kaltura_client.rb', line 765

def initialize(client)
  super(client)
end

Instance Method Details

#activate(entry_id, category_id) ⇒ Object

activate CategoryEntry when it is pending moderation

Returns:



771
772
773
774
775
776
777
778
779
780
# File 'lib/kaltura_client.rb', line 771

def activate(entry_id, category_id)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.add_param(kparams, 'categoryId', category_id)
  client.queue_service_action_call('categoryentry', 'activate', '', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#add(category_entry) ⇒ KalturaCategoryEntry

Add new CategoryEntry



784
785
786
787
788
789
790
791
792
# File 'lib/kaltura_client.rb', line 784

def add(category_entry)
  kparams = {}
  client.add_param(kparams, 'categoryEntry', category_entry)
  client.queue_service_action_call('categoryentry', 'add', 'KalturaCategoryEntry', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#add_from_bulk_upload(bulk_upload_data, bulk_upload_category_entry_data = KalturaNotImplemented) ⇒ KalturaBulkUpload

Returns:



795
796
797
798
799
800
801
802
803
804
# File 'lib/kaltura_client.rb', line 795

def add_from_bulk_upload(bulk_upload_data, bulk_upload_category_entry_data=KalturaNotImplemented)
  kparams = {}
  client.add_param(kparams, 'bulkUploadData', bulk_upload_data)
  client.add_param(kparams, 'bulkUploadCategoryEntryData', bulk_upload_category_entry_data)
  client.queue_service_action_call('categoryentry', 'addFromBulkUpload', 'KalturaBulkUpload', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#delete(entry_id, category_id) ⇒ Object

Delete CategoryEntry

Returns:



808
809
810
811
812
813
814
815
816
817
# File 'lib/kaltura_client.rb', line 808

def delete(entry_id, category_id)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.add_param(kparams, 'categoryId', category_id)
  client.queue_service_action_call('categoryentry', 'delete', '', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#index(entry_id, category_id, should_update = true) ⇒ int

Index CategoryEntry by Id

Returns:

  • (int)


821
822
823
824
825
826
827
828
829
830
831
# File 'lib/kaltura_client.rb', line 821

def index(entry_id, category_id, should_update=true)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.add_param(kparams, 'categoryId', category_id)
  client.add_param(kparams, 'shouldUpdate', should_update)
  client.queue_service_action_call('categoryentry', 'index', 'int', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

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

List all categoryEntry



835
836
837
838
839
840
841
842
843
844
# File 'lib/kaltura_client.rb', line 835

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

#reject(entry_id, category_id) ⇒ Object

activate CategoryEntry when it is pending moderation

Returns:



848
849
850
851
852
853
854
855
856
857
# File 'lib/kaltura_client.rb', line 848

def reject(entry_id, category_id)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.add_param(kparams, 'categoryId', category_id)
  client.queue_service_action_call('categoryentry', 'reject', '', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#sync_privacy_context(entry_id, category_id) ⇒ Object

update privacy context from the category

Returns:



861
862
863
864
865
866
867
868
869
870
# File 'lib/kaltura_client.rb', line 861

def sync_privacy_context(entry_id, category_id)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.add_param(kparams, 'categoryId', category_id)
  client.queue_service_action_call('categoryentry', 'syncPrivacyContext', '', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#update_status_from_bulk(file_data, bulk_upload_data = KalturaNotImplemented, bulk_upload_category_entry_data = KalturaNotImplemented) ⇒ KalturaBulkUpload

Returns:



873
874
875
876
877
878
879
880
881
882
883
884
# File 'lib/kaltura_client.rb', line 873

def update_status_from_bulk(file_data, bulk_upload_data=KalturaNotImplemented, bulk_upload_category_entry_data=KalturaNotImplemented)
  kparams = {}
  kfiles = {}
  client.add_param(kfiles, 'fileData', file_data)
  client.add_param(kparams, 'bulkUploadData', bulk_upload_data)
  client.add_param(kparams, 'bulkUploadCategoryEntryData', bulk_upload_category_entry_data)
  client.queue_service_action_call('categoryentry', 'updateStatusFromBulk', 'KalturaBulkUpload', kparams, kfiles)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end