listObjects method

Future<ListBucketResult?> listObjects({
  1. String? prefix,
  2. String? delimiter,
  3. int? maxKeys,
})

Implementation

Future<ListBucketResult?> listObjects(
    {String? prefix, String? delimiter, int? maxKeys}) async {
  final response = await _doSignedGetRequest(key: '', queryParams: {
    "list-type": "2",
    if (prefix != null) "prefix": prefix,
    if (delimiter != null) "delimiter": delimiter,
    if (maxKeys != null) "maxKeys": maxKeys.toString(),
  });
  _checkResponseError(response);
  return _parseListObjectResponse(response.body);
}