# =================================================================================================== # _ __ _ _ # | |/ /__ _| | |_ _ _ _ _ __ _ # | ' . # # @ignore # =================================================================================================== require 'kaltura_client.rb' module Kaltura class KalturaInternalToolsSession < KalturaObjectBase attr_accessor :partner_id attr_accessor :valid_until attr_accessor :partner_pattern attr_accessor :type attr_accessor :error attr_accessor :rand attr_accessor :user attr_accessor :privileges def partner_id=(val) @partner_id = val.to_i end def valid_until=(val) @valid_until = val.to_i end def type=(val) @type = val.to_i end def rand=(val) @rand = val.to_i end def from_xml(xml_element) super self.partner_id = xml_element.elements['partner_id'].text self.valid_until = xml_element.elements['valid_until'].text self.partner_pattern = xml_element.elements['partner_pattern'].text self.type = xml_element.elements['type'].text self.error = xml_element.elements['error'].text self.rand = xml_element.elements['rand'].text self.user = xml_element.elements['user'].text self.privileges = xml_element.elements['privileges'].text end end # Internal Tools Service # class KalturaKalturaInternalToolsSystemHelperService < KalturaServiceBase def initialize(client) super(client) end # KS from Secure String # def from_secure_string(str) kparams = {} client.add_param(kparams, 'str', str) client.queue_service_action_call('kalturainternaltools_kalturainternaltoolssystemhelper', 'fromSecureString', 'KalturaInternalToolsSession', kparams) if (client.is_multirequest) return nil end return client.do_queue() end # from ip to country # def iptocountry(remote_addr) kparams = {} client.add_param(kparams, 'remote_addr', remote_addr) client.queue_service_action_call('kalturainternaltools_kalturainternaltoolssystemhelper', 'iptocountry', 'string', kparams) if (client.is_multirequest) return nil end return client.do_queue() end def get_remote_address() kparams = {} client.queue_service_action_call('kalturainternaltools_kalturainternaltoolssystemhelper', 'getRemoteAddress', 'string', kparams) if (client.is_multirequest) return nil end return client.do_queue() end end class KalturaClient < KalturaClientBase attr_reader :kaltura_internal_tools_system_helper_service def kaltura_internal_tools_system_helper_service if (@kaltura_internal_tools_system_helper_service == nil) @kaltura_internal_tools_system_helper_service = KalturaKalturaInternalToolsSystemHelperService.new(self) end return @kaltura_internal_tools_system_helper_service end end end