def setup_client(self, read_url=True, url=None): pythonClient = PythonClient() if read_url: url, token = read_token() if url is None and token is None: raise Exception("No active session found. Please use 'ff login' command to log on.") pythonClient.url = url elif url is not None: pythonClient.url = url pythonClient.verbose = self.verbose return pythonClient
def execute_call(url, service, method, request): try: pythonClient = PythonClient() pythonClient.url = url pythonClient.verbose = True return pythonClient.execute(service, method, request) except Exception, e: if self.verbose: print("Error calling Exposure endpoint: ", e.value) return None
def execute_raw(self, url, service, method, request): try: pythonClient = PythonClient() pythonClient.url = url pythonClient.verbose = self.verbose return pythonClient.execute(service, method, request) except Exception, e: if self.verbose: print traceback.print_exc(e) # print("Error calling FF Core: ", e.value) return None
def setup_client(url): pythonClient = PythonClient() pythonClient.url = url pythonClient.verbose = True return pythonClient