Method: FlowClient::Client#get_events
- Defined in:
- lib/flow_client/client.rb
#get_events(type, start_height, end_height) ⇒ FlowClient::EventsResult
Returns events of the given type between the start and end block heights
292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/flow_client/client.rb', line 292 def get_events(type, start_height, end_height) req = Access::GetEventsForHeightRangeRequest.new( type: type, start_height: start_height, end_height: end_height ) begin res = @stub.get_events_for_height_range(req) rescue GRPC::BadStatus => e raise ClientError, e.details else res.results.map { |event| EventsResult.parse_grpc_type(event) } end end |