getRewards method
Returns rewards for a given hotspot per reward block the hotspot is in, for a given timeframe.
The block that contains the maxTime
timestamp is excluded from the
result.
address
is the B58 address of the hotspot.
Implementation
Future<HeliumPagedResponse<List<HeliumHotspotReward>>> getRewards(
String address, DateTime minTime, DateTime maxTime) async {
return _client._doPagedRequest(HeliumPagedRequest(
path: '/v1/hotspots/$address/rewards',
parameters: {
'min_time': minTime,
'max_time': maxTime,
},
extractResponse: (json) => HeliumRequest.mapDataList(
json, (r) => HeliumHotspotReward.fromJson(r)),
));
}