class ChannelsResourceByChannelAddress(BaseResource): patch_schema = ChannelRequestSchema(only=('balance', 'state'), ) @use_kwargs(patch_schema, locations=('json', )) def patch(self, **kwargs): return self.rest_api.patch_channel(**kwargs) def get(self, **kwargs): return self.rest_api.get_channel(**kwargs)
class ChannelsResource(BaseResource): put_schema = ChannelRequestSchema(exclude=('channel_address', 'state'), ) def get(self): """ this translates to 'get all channels the node is connected with' """ return self.rest_api.get_channel_list() @use_kwargs(put_schema, locations=('json', )) def put(self, **kwargs): return self.rest_api.open(**kwargs)
class ChannelsResourceByChannelAddress(BaseResource): patch_schema = ChannelRequestSchema( exclude=('token_address', 'partner_address', 'settle_timeout', 'channel_address'), ) def __init__(self, **kwargs): super(ChannelsResourceByChannelAddress, self).__init__(**kwargs) @use_kwargs(patch_schema, locations=('json', )) def patch(self, **kwargs): return self.rest_api.patch_channel(**kwargs) def get(self, **kwargs): return self.rest_api.get_channel(**kwargs)
class ChannelsResourceByChannelAddress(BaseResource): patch_schema = ChannelRequestSchema(only=('balance', 'state'), ) @use_kwargs(patch_schema, locations=('json', )) def patch(self, **kwargs): return self.rest_api.patch_channel( registry_address=self.rest_api.raiden_api.raiden.default_registry. address, **kwargs, ) def get(self, **kwargs): return self.rest_api.get_channel( registry_address=self.rest_api.raiden_api.raiden.default_registry. address, **kwargs, )