class Kaltura::KalturaSessionService

Session service

Public Class Methods

new(client) click to toggle source
Calls superclass method
# File lib/kaltura_client.rb, line 4378
def initialize(client)
        super(client)
end

Public Instance Methods

end() click to toggle source

End a session with the Kaltura server, making the current KS invalid. @return []

# File lib/kaltura_client.rb, line 4384
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) click to toggle source

Parse session key and return its info @return [KalturaSessionInfo]

# File lib/kaltura_client.rb, line 4395
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) click to toggle source

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.

@return [string]

# File lib/kaltura_client.rb, line 4408
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) click to toggle source

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

@return [KalturaSessionInfo]

# File lib/kaltura_client.rb, line 4428
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) click to toggle source

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.

@return [string]

# File lib/kaltura_client.rb, line 4444
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) click to toggle source

Start a session for Kaltura's flash widgets @return [KalturaStartWidgetSessionResponse]

# File lib/kaltura_client.rb, line 4461
def start_widget_session(widget_id, expiry=86400)
        kparams = {}
        client.add_param(kparams, 'widgetId', widget_id)
        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