Class: Kaltura::KalturaCategoryUserService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaCategoryUserService
- Defined in:
- lib/kaltura_client.rb
Overview
Add & Manage CategoryUser - membership of a user in a category
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#activate(category_id, user_id) ⇒ KalturaCategoryUser
activate CategoryUser.
-
#add(category_user) ⇒ KalturaCategoryUser
Add new CategoryUser.
- #add_from_bulk_upload(file_data, bulk_upload_data = KalturaNotImplemented, bulk_upload_category_user_data = KalturaNotImplemented) ⇒ KalturaBulkUpload
-
#copy_from_category(category_id) ⇒ Object
Copy all member from parent category.
-
#deactivate(category_id, user_id) ⇒ KalturaCategoryUser
reject CategoryUser.
-
#delete(category_id, user_id) ⇒ Object
Delete a CategoryUser.
-
#get(category_id, user_id) ⇒ KalturaCategoryUser
Get CategoryUser by id.
-
#index(user_id, category_id, should_update = true) ⇒ int
Index CategoryUser by userid and category id.
-
#initialize(client) ⇒ KalturaCategoryUserService
constructor
A new instance of KalturaCategoryUserService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaCategoryUserListResponse
List all categories.
-
#update(category_id, user_id, category_user, override = false) ⇒ KalturaCategoryUser
Update CategoryUser by id.
Constructor Details
#initialize(client) ⇒ KalturaCategoryUserService
Returns a new instance of KalturaCategoryUserService.
1066 1067 1068 |
# File 'lib/kaltura_client.rb', line 1066 def initialize(client) super(client) end |
Instance Method Details
#activate(category_id, user_id) ⇒ KalturaCategoryUser
activate CategoryUser
1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 |
# File 'lib/kaltura_client.rb', line 1072 def activate(category_id, user_id) kparams = {} client.add_param(kparams, 'categoryId', category_id) client.add_param(kparams, 'userId', user_id) client.queue_service_action_call('categoryuser', 'activate', 'KalturaCategoryUser', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#add(category_user) ⇒ KalturaCategoryUser
Add new CategoryUser
1085 1086 1087 1088 1089 1090 1091 1092 1093 |
# File 'lib/kaltura_client.rb', line 1085 def add(category_user) kparams = {} client.add_param(kparams, 'categoryUser', category_user) client.queue_service_action_call('categoryuser', 'add', 'KalturaCategoryUser', 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_user_data = KalturaNotImplemented) ⇒ KalturaBulkUpload
1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 |
# File 'lib/kaltura_client.rb', line 1096 def add_from_bulk_upload(file_data, bulk_upload_data=KalturaNotImplemented, bulk_upload_category_user_data=KalturaNotImplemented) kparams = {} kfiles = {} client.add_param(kfiles, 'fileData', file_data) client.add_param(kparams, 'bulkUploadData', bulk_upload_data) client.add_param(kparams, 'bulkUploadCategoryUserData', bulk_upload_category_user_data) client.queue_service_action_call('categoryuser', 'addFromBulkUpload', 'KalturaBulkUpload', kparams, kfiles) if (client.is_multirequest) return nil end return client.do_queue() end |
#copy_from_category(category_id) ⇒ Object
Copy all member from parent category
1111 1112 1113 1114 1115 1116 1117 1118 1119 |
# File 'lib/kaltura_client.rb', line 1111 def copy_from_category(category_id) kparams = {} client.add_param(kparams, 'categoryId', category_id) client.queue_service_action_call('categoryuser', 'copyFromCategory', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#deactivate(category_id, user_id) ⇒ KalturaCategoryUser
reject CategoryUser
1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 |
# File 'lib/kaltura_client.rb', line 1123 def deactivate(category_id, user_id) kparams = {} client.add_param(kparams, 'categoryId', category_id) client.add_param(kparams, 'userId', user_id) client.queue_service_action_call('categoryuser', 'deactivate', 'KalturaCategoryUser', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#delete(category_id, user_id) ⇒ Object
Delete a CategoryUser
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 |
# File 'lib/kaltura_client.rb', line 1136 def delete(category_id, user_id) kparams = {} client.add_param(kparams, 'categoryId', category_id) client.add_param(kparams, 'userId', user_id) client.queue_service_action_call('categoryuser', 'delete', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get(category_id, user_id) ⇒ KalturaCategoryUser
Get CategoryUser by id
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/kaltura_client.rb', line 1149 def get(category_id, user_id) kparams = {} client.add_param(kparams, 'categoryId', category_id) client.add_param(kparams, 'userId', user_id) client.queue_service_action_call('categoryuser', 'get', 'KalturaCategoryUser', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#index(user_id, category_id, should_update = true) ⇒ int
Index CategoryUser by userid and category id
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 |
# File 'lib/kaltura_client.rb', line 1162 def index(user_id, category_id, should_update=true) kparams = {} client.add_param(kparams, 'userId', user_id) client.add_param(kparams, 'categoryId', category_id) client.add_param(kparams, 'shouldUpdate', should_update) client.queue_service_action_call('categoryuser', 'index', 'int', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaCategoryUserListResponse
List all categories
1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 |
# File 'lib/kaltura_client.rb', line 1176 def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter) client.add_param(kparams, 'pager', pager) client.queue_service_action_call('categoryuser', 'list', 'KalturaCategoryUserListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update(category_id, user_id, category_user, override = false) ⇒ KalturaCategoryUser
Update CategoryUser by id
1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 |
# File 'lib/kaltura_client.rb', line 1189 def update(category_id, user_id, category_user, override=false) kparams = {} client.add_param(kparams, 'categoryId', category_id) client.add_param(kparams, 'userId', user_id) client.add_param(kparams, 'categoryUser', category_user) client.add_param(kparams, 'override', override) client.queue_service_action_call('categoryuser', 'update', 'KalturaCategoryUser', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |