def GetBulkKeywordIdeas(self, selector): """Return a list of pages with ideas. List of pages specified by a targeting idea selector. This method is specialized for returning bulk keyword ideas. Args: selector: dict filter to run targeting ideas through. Returns: tuple list of pages with targeting ideas of the selector. """ method_name = 'getBulkKeywordIdeas' if self.__config['soap_lib'] == SOAPPY: msg = ('The \'%s\' request via %s is currently not supported for ' 'use with SOAPpy toolkit.' % (Utils.GetCurrentFuncName(), self.__op_config['version'])) raise ApiVersionNotSupportedError(msg) elif self.__config['soap_lib'] == ZSI: web_services = self.__web_services self.__sanity_check.ValidateSelector(selector, web_services) request = eval('web_services.%sRequest()' % method_name) return self.__service.CallMethod(method_name, (({ 'selector': selector }, )), 'TargetingIdea', self.__loc, request)
def Get(self, selector): """Return a list of bulk mutate jobs. List of bulk mutate jobs specified by a job selector. Args: selector: dict filter to run campaign criteria through. Returns: tuple list of bulk mutate jobs meeting all the criteria of the selector. """ method_name = 'getBulkMutateJob' if self.__config['soap_lib'] == SOAPPY: msg = ('The \'%s\' request via %s is currently not supported for ' 'use with SOAPpy toolkit.' % (Utils.GetCurrentFuncName(), self.__op_config['version'])) raise ApiVersionNotSupportedError(msg) elif self.__config['soap_lib'] == ZSI: web_services = self.__web_services self.__sanity_check.ValidateSelector(selector, web_services) request = eval('web_services.%sRequest()' % method_name) return self.__service.CallMethod(method_name, (({ 'selector': selector }, )), 'BulkMutateJob', self.__loc, request)
def Get(self, selector): """Return the API usage information. Usage information is based on the selection criteria of the selector. Args: selector: dict filter to run API usage through. Returns: tuple API usage information. """ method_name = 'getInfo' if self.__config['soap_lib'] == SOAPPY: msg = ('The \'%s\' request via %s is currently not supported for ' 'use with SOAPpy toolkit.' % (Utils.GetCurrentFuncName(), self.__op_config['version'])) raise ApiVersionNotSupportedError(msg) elif self.__config['soap_lib'] == ZSI: web_services = self.__web_services self.__sanity_check.ValidateSelector(selector, web_services) request = eval('web_services.%sRequest()' % method_name) return self.__service.CallMethod(method_name, (({ 'selector': selector }, )), 'Info', self.__loc, request)
def Mutate(self, op): """Add or update bulk mutate job. Args: op: dict operation. Returns: tuple mutated bulk mutate job. """ method_name = 'mutateBulkMutateJob' if self.__config['soap_lib'] == SOAPPY: msg = ('The \'%s\' request via %s is currently not supported for ' 'use with SOAPpy toolkit.' % (Utils.GetCurrentFuncName(), self.__op_config['version'])) raise ApiVersionNotSupportedError(msg) elif self.__config['soap_lib'] == ZSI: web_services = self.__web_services op = self.__sanity_check.ValidateOperation(op, web_services) request = eval('web_services.%sRequest()' % method_name) return self.__service.CallMethod(method_name, (({ 'operation': op }, )), 'BulkMutateJob', self.__loc, request)