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.



790
791
792
# File 'lib/kaltura_client.rb', line 790

def initialize(client)
  super(client)
end

Instance Method Details

#activate(entry_id, category_id) ⇒ Object

activate CategoryEntry when it is pending moderation

Returns:



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

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



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

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:



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

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:



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

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)


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

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



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

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:



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

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:



886
887
888
889
890
891
892
893
894
895
# File 'lib/kaltura_client.rb', line 886

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:



898
899
900
901
902
903
904
905
906
907
908
909
# File 'lib/kaltura_client.rb', line 898

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