getUserHistory method

Future<BuiltList<History>> getUserHistory(
  1. String username, {
  2. HistoryType? type,
})

Implementation

Future<BuiltList<History>> getUserHistory(String username,
    {HistoryType? type}) async {
  var url = '/user/$username/history';
  if (type != null) url += '/${_enumToString(type)}';
  var response = await _getResponse(url);

  final history = response['history'] ?? [];
  return serializers.deserialize(history, specifiedType: _fullType(History))!
      as BuiltList<History>;
}