getStats method

Future getStats({
  1. required int startEpoch,
  2. required int stopEpoch,
  3. required StatisticsParams statisticsType,
})

Implementation

Future<dynamic> getStats(
    {required int startEpoch,
    required int stopEpoch,
    required StatisticsParams statisticsType}) async {
  try {
    print('stats ${statisticsType.name.paramCase}');
    return await client.get(api('network/statistics', {
      "key": statisticsType.name.paramCase,
      "start_epoch": startEpoch,
      "stop_epoch": stopEpoch,
    }));
  } on ExplorerException catch (e) {
    throw ExplorerException(
        code: e.code, message: '{"statistics": "${e.message}"}');
  }
}