class NetworkEventsResource(BaseResource): get_schema = EventRequestSchema() @use_kwargs(get_schema, locations=('query', )) def get(self, from_block, to_block): return self.rest_api.get_network_events( from_block=from_block, to_block=to_block, )
class ChannelEventsResource(BaseResource): get_schema = EventRequestSchema() @use_kwargs(get_schema, locations=('query', )) def get(self, channel_address, from_block, to_block): return self.rest_api.get_channel_events( channel_address=channel_address, from_block=from_block, to_block=to_block, )
class NetworkEventsResource(BaseResource): get_schema = EventRequestSchema() def __init__(self, **kwargs): super(NetworkEventsResource, self).__init__(**kwargs) @use_kwargs(get_schema, locations=('query', )) def get(self, **kwargs): return self.rest_api.get_network_events(kwargs['from_block'], kwargs['to_block'])
class NetworkEventsResource(BaseResource): get_schema = EventRequestSchema() @use_kwargs(get_schema, locations=('query',)) def get(self, from_block, to_block): return self.rest_api.get_network_events( registry_address=self.rest_api.raiden_api.raiden.default_registry.address, from_block=from_block, to_block=to_block, )
class TokenRaidenEventsResource(BaseResource): get_schema = EventRequestSchema() @use_kwargs(get_schema, locations=('query', )) def get(self, token_address, from_block, to_block): from_block = from_block or self.rest_api.raiden_api.raiden.query_start_block to_block = to_block or 'latest' return self.rest_api.get_token_network_events_raiden( token_address=token_address, from_block=from_block, to_block=to_block, )
class ChannelEventsResource(BaseResource): get_schema = EventRequestSchema() @use_kwargs(get_schema, locations=('query', )) def get(self, token_network_address, channel_identifier, from_block, to_block): from_block = from_block or 0 to_block = to_block or 'latest' return self.rest_api.get_channel_events( token_network_address=token_network_address, channel_identifier=channel_identifier, from_block=from_block, to_block=to_block, )
class ChannelRaidenEventsResource(BaseResource): get_schema = EventRequestSchema() @use_kwargs(get_schema, locations=('query', )) def get(self, token_address, partner_address=None, from_block=None, to_block=None): from_block = from_block or self.rest_api.raiden_api.raiden.query_start_block to_block = to_block or 'latest' return self.rest_api.get_channel_events_raiden( token_address=token_address, partner_address=partner_address, from_block=from_block, to_block=to_block, )