Class: Kaltura::KalturaAdminUserService

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

Overview

Manage details for the administrative user

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaAdminUserService

Returns a new instance of KalturaAdminUserService.



175
176
177
# File 'lib/kaltura_client.rb', line 175

def initialize(client)
	super(client)
end

Instance Method Details

#login(email, password, partner_id = KalturaNotImplemented) ⇒ string

Get an admin session using admin email and password (Used for login to the KMC application)

Returns:

  • (string)


181
182
183
184
185
186
187
188
189
190
191
# File 'lib/kaltura_client.rb', line 181

def (email, password, partner_id=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'email', email)
	client.add_param(kparams, 'password', password)
	client.add_param(kparams, 'partnerId', partner_id)
	client.queue_service_action_call('adminuser', 'login', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#reset_password(email) ⇒ Object

Reset admin user password and send it to the users email address

Returns:



195
196
197
198
199
200
201
202
203
# File 'lib/kaltura_client.rb', line 195

def reset_password(email)
	kparams = {}
	client.add_param(kparams, 'email', email)
	client.queue_service_action_call('adminuser', 'resetPassword', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#set_initial_password(hash_key, new_password) ⇒ KalturaAuthentication

Set initial users password



207
208
209
210
211
212
213
214
215
216
# File 'lib/kaltura_client.rb', line 207

def set_initial_password(hash_key, new_password)
	kparams = {}
	client.add_param(kparams, 'hashKey', hash_key)
	client.add_param(kparams, 'newPassword', new_password)
	client.queue_service_action_call('adminuser', 'setInitialPassword', 'KalturaAuthentication', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update_password(email, password, new_email = '', new_password = '', otp = KalturaNotImplemented) ⇒ KalturaAdminUser

Update admin user password and email

Returns:



220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/kaltura_client.rb', line 220

def update_password(email, password, new_email='', new_password='', otp=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'email', email)
	client.add_param(kparams, 'password', password)
	client.add_param(kparams, 'newEmail', new_email)
	client.add_param(kparams, 'newPassword', new_password)
	client.add_param(kparams, 'otp', otp)
	client.queue_service_action_call('adminuser', 'updatePassword', 'KalturaAdminUser', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end