How to use the gear.thor.request.Restful function in gear

To help you get started, we’ve selected a few gear examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vechain / web3-gear / gear / thor / client.py View on Github external
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
github vechain / web3-gear / gear / thor / request.py View on Github external
def __getattr__(self, resource):
        return Restful('%s/%s' % (self._endpoint, resource))
github vechain / web3-gear / gear / thor / request.py View on Github external
def __call__(self, parameter):
        if parameter is not None:
            return Restful('%s/%s' % (self._endpoint, parameter))
        return self
github vechain / web3-gear / gear / thor / request.py View on Github external
def __init__(self, endpoint):
        super(Restful, self).__init__()
        self._endpoint = endpoint