Class: Kaltura::KalturaCategoryService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaCategoryService
- Defined in:
- lib/kaltura_client.rb
Overview
Add & Manage Categories
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(category) ⇒ KalturaCategory
Add new Category.
- #add_from_bulk_upload(file_data, bulk_upload_data = KalturaNotImplemented, bulk_upload_category_data = KalturaNotImplemented) ⇒ KalturaBulkUpload
-
#delete(id, move_entries_to_parent_category = 1) ⇒ Object
Delete a Category.
-
#get(id) ⇒ KalturaCategory
Get Category by id.
-
#index(id, should_update = true) ⇒ int
Index Category by id.
-
#initialize(client) ⇒ KalturaCategoryService
constructor
A new instance of KalturaCategoryService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaCategoryListResponse
List all categories.
-
#move(category_ids, target_category_parent_id) ⇒ bool
Move categories that belong to the same parent category to a target categroy - enabled only for ks with disable entitlement.
-
#unlock_categories ⇒ Object
Unlock categories.
-
#update(id, category) ⇒ KalturaCategory
Update Category.
Constructor Details
#initialize(client) ⇒ KalturaCategoryService
Returns a new instance of KalturaCategoryService.
890 891 892 |
# File 'lib/kaltura_client.rb', line 890 def initialize(client) super(client) end |
Instance Method Details
#add(category) ⇒ KalturaCategory
Add new Category
896 897 898 899 900 901 902 903 904 |
# File 'lib/kaltura_client.rb', line 896 def add(category) kparams = {} client.add_param(kparams, 'category', category) client.queue_service_action_call('category', 'add', 'KalturaCategory', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#add_from_bulk_upload(file_data, bulk_upload_data = KalturaNotImplemented, bulk_upload_category_data = KalturaNotImplemented) ⇒ KalturaBulkUpload
907 908 909 910 911 912 913 914 915 916 917 918 |
# File 'lib/kaltura_client.rb', line 907 def add_from_bulk_upload(file_data, bulk_upload_data=KalturaNotImplemented, bulk_upload_category_data=KalturaNotImplemented) kparams = {} kfiles = {} client.add_param(kfiles, 'fileData', file_data) client.add_param(kparams, 'bulkUploadData', bulk_upload_data) client.add_param(kparams, 'bulkUploadCategoryData', bulk_upload_category_data) client.queue_service_action_call('category', 'addFromBulkUpload', 'KalturaBulkUpload', kparams, kfiles) if (client.is_multirequest) return nil end return client.do_queue() end |
#delete(id, move_entries_to_parent_category = 1) ⇒ Object
Delete a Category
922 923 924 925 926 927 928 929 930 931 |
# File 'lib/kaltura_client.rb', line 922 def delete(id, move_entries_to_parent_category=1) kparams = {} client.add_param(kparams, 'id', id) client.add_param(kparams, 'moveEntriesToParentCategory', move_entries_to_parent_category) client.queue_service_action_call('category', 'delete', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get(id) ⇒ KalturaCategory
Get Category by id
935 936 937 938 939 940 941 942 943 |
# File 'lib/kaltura_client.rb', line 935 def get(id) kparams = {} client.add_param(kparams, 'id', id) client.queue_service_action_call('category', 'get', 'KalturaCategory', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#index(id, should_update = true) ⇒ int
Index Category by id
947 948 949 950 951 952 953 954 955 956 |
# File 'lib/kaltura_client.rb', line 947 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('category', 'index', 'int', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaCategoryListResponse
List all categories
960 961 962 963 964 965 966 967 968 969 |
# File 'lib/kaltura_client.rb', line 960 def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter) client.add_param(kparams, 'pager', pager) client.queue_service_action_call('category', 'list', 'KalturaCategoryListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#move(category_ids, target_category_parent_id) ⇒ bool
Move categories that belong to the same parent category to a target categroy - enabled only for ks with disable entitlement
973 974 975 976 977 978 979 980 981 982 |
# File 'lib/kaltura_client.rb', line 973 def move(category_ids, target_category_parent_id) kparams = {} client.add_param(kparams, 'categoryIds', category_ids) client.add_param(kparams, 'targetCategoryParentId', target_category_parent_id) client.queue_service_action_call('category', 'move', 'bool', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#unlock_categories ⇒ Object
Unlock categories
986 987 988 989 990 991 992 993 |
# File 'lib/kaltura_client.rb', line 986 def unlock_categories() kparams = {} client.queue_service_action_call('category', 'unlockCategories', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update(id, category) ⇒ KalturaCategory
Update Category
997 998 999 1000 1001 1002 1003 1004 1005 1006 |
# File 'lib/kaltura_client.rb', line 997 def update(id, category) kparams = {} client.add_param(kparams, 'id', id) client.add_param(kparams, 'category', category) client.queue_service_action_call('category', 'update', 'KalturaCategory', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |