Class: Kaltura::KalturaSessionService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaSessionService
- Defined in:
- lib/kaltura_client.rb
Overview
Session service
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#end ⇒ Object
End a session with the Kaltura server, making the current KS invalid.
-
#get(session = KalturaNotImplemented) ⇒ Object
Parse session key and return its info.
-
#impersonate(secret, impersonated_partner_id, user_id = '', type = 0, partner_id = KalturaNotImplemented, expiry = 86400, privileges = KalturaNotImplemented) ⇒ Object
Start an impersonated session with Kaltura’s server.
-
#impersonate_by_ks(session, type = KalturaNotImplemented, expiry = KalturaNotImplemented, privileges = KalturaNotImplemented) ⇒ Object
Start an impersonated session with Kaltura’s server.
-
#initialize(client) ⇒ KalturaSessionService
constructor
A new instance of KalturaSessionService.
-
#start(secret, user_id = '', type = 0, partner_id = KalturaNotImplemented, expiry = 86400, privileges = KalturaNotImplemented) ⇒ Object
Start a session with Kaltura’s server.
-
#start_widget_session(widget_id, expiry = 86400) ⇒ Object
Start a session for Kaltura’s flash widgets.
Constructor Details
#initialize(client) ⇒ KalturaSessionService
Returns a new instance of KalturaSessionService.
4136 4137 4138 |
# File 'lib/kaltura_client.rb', line 4136 def initialize(client) super(client) end |
Instance Method Details
#end ⇒ Object
End a session with the Kaltura server, making the current KS invalid.
4160 4161 4162 4163 4164 4165 4166 4167 |
# File 'lib/kaltura_client.rb', line 4160 def end() kparams = {} client.queue_service_action_call('session', 'end', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get(session = KalturaNotImplemented) ⇒ Object
Parse session key and return its info
4207 4208 4209 4210 4211 4212 4213 4214 4215 |
# File 'lib/kaltura_client.rb', line 4207 def get(session=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'session', session) client.queue_service_action_call('session', 'get', 'KalturaSessionInfo', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#impersonate(secret, impersonated_partner_id, user_id = '', type = 0, partner_id = KalturaNotImplemented, expiry = 86400, privileges = KalturaNotImplemented) ⇒ Object
Start an impersonated session with Kaltura’s server. The result KS is the session key that you should pass to all services that requires a ticket.
4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 |
# File 'lib/kaltura_client.rb', line 4172 def impersonate(secret, impersonated_partner_id, user_id='', type=0, partner_id=KalturaNotImplemented, expiry=86400, privileges=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'secret', secret) client.add_param(kparams, 'impersonatedPartnerId', impersonated_partner_id) client.add_param(kparams, 'userId', user_id) client.add_param(kparams, 'type', type) client.add_param(kparams, 'partnerId', partner_id) client.add_param(kparams, 'expiry', expiry) client.add_param(kparams, 'privileges', privileges) client.queue_service_action_call('session', 'impersonate', 'string', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#impersonate_by_ks(session, type = KalturaNotImplemented, expiry = KalturaNotImplemented, privileges = KalturaNotImplemented) ⇒ Object
Start an impersonated session with Kaltura’s server. The result KS info contains the session key that you should pass to all services that requires a ticket. Type, expiry and privileges won’t be changed if they’re not set
4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 |
# File 'lib/kaltura_client.rb', line 4192 def impersonate_by_ks(session, type=KalturaNotImplemented, expiry=KalturaNotImplemented, privileges=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'session', session) client.add_param(kparams, 'type', type) client.add_param(kparams, 'expiry', expiry) client.add_param(kparams, 'privileges', privileges) client.queue_service_action_call('session', 'impersonateByKs', 'KalturaSessionInfo', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#start(secret, user_id = '', type = 0, partner_id = KalturaNotImplemented, expiry = 86400, privileges = KalturaNotImplemented) ⇒ Object
Start a session with Kaltura’s server. The result KS is the session key that you should pass to all services that requires a ticket.
4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 |
# File 'lib/kaltura_client.rb', line 4143 def start(secret, user_id='', type=0, partner_id=KalturaNotImplemented, expiry=86400, privileges=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'secret', secret) client.add_param(kparams, 'userId', user_id) client.add_param(kparams, 'type', type) client.add_param(kparams, 'partnerId', partner_id) client.add_param(kparams, 'expiry', expiry) client.add_param(kparams, 'privileges', privileges) client.queue_service_action_call('session', 'start', 'string', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#start_widget_session(widget_id, expiry = 86400) ⇒ Object
Start a session for Kaltura’s flash widgets
4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 |
# File 'lib/kaltura_client.rb', line 4219 def (, expiry=86400) kparams = {} client.add_param(kparams, 'widgetId', ) client.add_param(kparams, 'expiry', expiry) client.queue_service_action_call('session', 'startWidgetSession', 'KalturaStartWidgetSessionResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |