Class: Kaltura::KalturaAppTokenService

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

Overview

Manage application authentication tokens

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaAppTokenService

Returns a new instance of KalturaAppTokenService.



257
258
259
# File 'lib/kaltura_client.rb', line 257

def initialize(client)
	super(client)
end

Instance Method Details

#add(app_token) ⇒ KalturaAppToken

Add new application authentication token

Returns:



263
264
265
266
267
268
269
270
271
# File 'lib/kaltura_client.rb', line 263

def add(app_token)
	kparams = {}
	client.add_param(kparams, 'appToken', app_token)
	client.queue_service_action_call('apptoken', 'add', 'KalturaAppToken', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(id) ⇒ Object

Delete application authentication token by ID

Returns:



275
276
277
278
279
280
281
282
283
# File 'lib/kaltura_client.rb', line 275

def delete(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('apptoken', 'delete', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(id) ⇒ KalturaAppToken

Get application authentication token by ID

Returns:



287
288
289
290
291
292
293
294
295
# File 'lib/kaltura_client.rb', line 287

def get(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('apptoken', 'get', 'KalturaAppToken', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

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

List application authentication tokens by filter and pager



299
300
301
302
303
304
305
306
307
308
# File 'lib/kaltura_client.rb', line 299

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('apptoken', 'list', 'KalturaAppTokenListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#start_session(id, token_hash, user_id = KalturaNotImplemented, type = KalturaNotImplemented, expiry = KalturaNotImplemented, session_privileges = KalturaNotImplemented) ⇒ KalturaSessionInfo

Starts a new KS (kaltura Session) based on an application authentication token ID

Returns:



312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/kaltura_client.rb', line 312

def start_session(id, token_hash, user_id=KalturaNotImplemented, type=KalturaNotImplemented, expiry=KalturaNotImplemented, session_privileges=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'tokenHash', token_hash)
	client.add_param(kparams, 'userId', user_id)
	client.add_param(kparams, 'type', type)
	client.add_param(kparams, 'expiry', expiry)
	client.add_param(kparams, 'sessionPrivileges', session_privileges)
	client.queue_service_action_call('apptoken', 'startSession', 'KalturaSessionInfo', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update(id, app_token) ⇒ KalturaAppToken

Update application authentication token by ID

Returns:



329
330
331
332
333
334
335
336
337
338
# File 'lib/kaltura_client.rb', line 329

def update(id, app_token)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'appToken', app_token)
	client.queue_service_action_call('apptoken', 'update', 'KalturaAppToken', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end