Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def set_endpoint(self, endpoint):
restful = Restful(endpoint)
self.transactions = restful.transactions
self.blocks = restful.blocks
self.accounts = restful.accounts
self.logs = restful.logs
self.debug = restful.debug
def __getattr__(self, resource):
return Restful('%s/%s' % (self._endpoint, resource))
def __call__(self, parameter):
if parameter is not None:
return Restful('%s/%s' % (self._endpoint, parameter))
return self
def __init__(self, endpoint):
super(Restful, self).__init__()
self._endpoint = endpoint