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

Returns a new instance of KalturaCategoryUserService.



9840
9841
9842
# File 'lib/kaltura_client.rb', line 9840

def initialize(client)
	super(client)
end

Instance Method Details

#activate(category_id, user_id) ⇒ Object

activate CategoryUser



9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
# File 'lib/kaltura_client.rb', line 9900

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', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#add(category_user) ⇒ Object

Add new CategoryUser



9846
9847
9848
9849
9850
9851
9852
9853
9854
# File 'lib/kaltura_client.rb', line 9846

def add(category_user)
	kparams = {}
	client.add_param(kparams, 'categoryUser', category_user);
	client.queue_service_action_call('categoryuser', 'add', 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) ⇒ Object



9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
# File 'lib/kaltura_client.rb', line 9963

def add_from_bulk_upload(file_data, bulk_upload_data=KalturaNotImplemented, bulk_upload_category_user_data=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, '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', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#copy_from_category(category_id) ⇒ Object

Copy all memeber from parent category



9939
9940
9941
9942
9943
9944
9945
9946
9947
# File 'lib/kaltura_client.rb', line 9939

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) ⇒ Object

reject CategoryUser



9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
# File 'lib/kaltura_client.rb', line 9913

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', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#delete(category_id, user_id) ⇒ Object

Delete a CategoryUser



9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
# File 'lib/kaltura_client.rb', line 9887

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) ⇒ Object

Get CategoryUser by id



9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
# File 'lib/kaltura_client.rb', line 9858

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', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#index(user_id, category_id, should_update = true) ⇒ Object

Index CategoryUser by userid and category id



9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
# File 'lib/kaltura_client.rb', line 9951

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', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

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

List all categories



9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
# File 'lib/kaltura_client.rb', line 9926

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', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#update(category_id, user_id, category_user, override = false) ⇒ Object

Update CategoryUser by id



9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
# File 'lib/kaltura_client.rb', line 9871

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);
	# - to override manual changes
	client.add_param(kparams, 'override', override);
	client.queue_service_action_call('categoryuser', 'update', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end