Class: Kaltura::KalturaAppTokenService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaAppTokenService
- Defined in:
- lib/kaltura_client.rb
Overview
Manage application authentication tokens
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(app_token) ⇒ Object
Add new application authentication token.
-
#delete(id) ⇒ Object
Delete application authentication token by id.
-
#get(id) ⇒ Object
Get application authentication token by id.
-
#initialize(client) ⇒ KalturaAppTokenService
constructor
A new instance of KalturaAppTokenService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List application authentication tokens by filter and pager.
-
#start_session(id, token_hash, user_id = KalturaNotImplemented, type = KalturaNotImplemented, expiry = KalturaNotImplemented) ⇒ Object
Starts a new KS (kaltura Session) based on application authentication token id.
-
#update(id, app_token) ⇒ Object
Update application authentication token by id.
Constructor Details
#initialize(client) ⇒ KalturaAppTokenService
Returns a new instance of KalturaAppTokenService.
240 241 242 |
# File 'lib/kaltura_client.rb', line 240 def initialize(client) super(client) end |
Instance Method Details
#add(app_token) ⇒ Object
Add new application authentication token
246 247 248 249 250 251 252 253 254 |
# File 'lib/kaltura_client.rb', line 246 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
283 284 285 286 287 288 289 290 291 |
# File 'lib/kaltura_client.rb', line 283 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) ⇒ Object
Get application authentication token by id
258 259 260 261 262 263 264 265 266 |
# File 'lib/kaltura_client.rb', line 258 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) ⇒ Object
List application authentication tokens by filter and pager
295 296 297 298 299 300 301 302 303 304 |
# File 'lib/kaltura_client.rb', line 295 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) ⇒ Object
Starts a new KS (kaltura Session) based on application authentication token id
308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/kaltura_client.rb', line 308 def start_session(id, token_hash, user_id=KalturaNotImplemented, type=KalturaNotImplemented, expiry=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.queue_service_action_call('apptoken', 'startSession', 'KalturaSessionInfo', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update(id, app_token) ⇒ Object
Update application authentication token by id
270 271 272 273 274 275 276 277 278 279 |
# File 'lib/kaltura_client.rb', line 270 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 |