Class: Kaltura::KalturaCategoryUserService

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

Overview

Add & Manage CategoryUser - membership of a user in a category

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaCategoryUserService



1010
1011
1012
# File 'lib/kaltura_client.rb', line 1010

def initialize(client)
	super(client)
end

Instance Method Details

#activate(category_id, user_id) ⇒ KalturaCategoryUser

activate CategoryUser



1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
# File 'lib/kaltura_client.rb', line 1016

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



1029
1030
1031
1032
1033
1034
1035
1036
1037
# File 'lib/kaltura_client.rb', line 1029

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



1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
# File 'lib/kaltura_client.rb', line 1040

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



1055
1056
1057
1058
1059
1060
1061
1062
1063
# File 'lib/kaltura_client.rb', line 1055

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



1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
# File 'lib/kaltura_client.rb', line 1067

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



1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# File 'lib/kaltura_client.rb', line 1080

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



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
# File 'lib/kaltura_client.rb', line 1093

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



1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
# File 'lib/kaltura_client.rb', line 1106

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



1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
# File 'lib/kaltura_client.rb', line 1120

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



1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
# File 'lib/kaltura_client.rb', line 1133

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