def doMultiRequest(self): resultXml = self.doQueue() if resultXml is None: return [] result = [] for i, childNode in enumerate(resultXml.getchildren()): exceptionObj = self.getExceptionIfError(childNode) if exceptionObj is not None: result.append(exceptionObj) elif childNode.find('objectType') is not None: result.append( KalturaObjectFactory.create( childNode, self.multiRequestReturnType[i])) elif childNode.find('item/objectType') is not None: result.append( KalturaObjectFactory.createArray( childNode, self.multiRequestReturnType[i])) else: result.append(getXmlNodeText(childNode)) self.multiRequestReturnType = None return result
def __init__(self, config): self.config = None self.shouldLog = False self.multiRequestReturnType = None self.callsQueue = [] self.requestHeaders = {} self.clientConfiguration = { 'clientTag': 'python-18-04-20', 'apiVersion': API_VERSION, } self.requestConfiguration = {} self.config = config logger = self.config.getLogger() if (logger): self.shouldLog = True KalturaObjectFactory.registerObjects( {'KalturaObjectBase': KalturaObjectBase}) self.loadPlugins() self.loadConfigurations()
def __init__(self, config): self.config = None self.shouldLog = False self.multiRequestReturnType = None self.callsQueue = [] self.requestHeaders = {} self.clientConfiguration = { 'clientTag': 'python-@DATE@', 'apiVersion': API_VERSION, } self.requestConfiguration = {} self.config = config logger = self.config.getLogger() if (logger): self.shouldLog = True KalturaObjectFactory.registerObjects( {'KalturaObjectBase': KalturaObjectBase}) self.loadPlugins() self.loadConfigurations()
def registerPluginObjects(self, plugin): KalturaEnumsFactory.registerEnums(plugin.getEnums()) KalturaObjectFactory.registerObjects(plugin.getTypes())