describeRootFolders method

Future<DescribeRootFoldersResponse> describeRootFolders({
  1. required String authenticationToken,
  2. int? limit,
  3. String? marker,
})

Describes the current user's special folders; the RootFolder and the RecycleBin. RootFolder is the root of user's files and folders and RecycleBin is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.

This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see Authentication and Access Control for User Applications in the Amazon WorkDocs Developer Guide.

May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException. May throw InvalidArgumentException. May throw FailedDependencyException. May throw ServiceUnavailableException.

Parameter authenticationToken : Amazon WorkDocs authentication token.

Parameter limit : The maximum number of items to return.

Parameter marker : The marker for the next set of results. (You received this marker from a previous call.)

Implementation

Future<DescribeRootFoldersResponse> describeRootFolders({
  required String authenticationToken,
  int? limit,
  String? marker,
}) async {
  ArgumentError.checkNotNull(authenticationToken, 'authenticationToken');
  _s.validateStringLength(
    'authenticationToken',
    authenticationToken,
    1,
    8199,
    isRequired: true,
  );
  _s.validateNumRange(
    'limit',
    limit,
    1,
    999,
  );
  _s.validateStringLength(
    'marker',
    marker,
    1,
    2048,
  );
  final headers = <String, String>{
    'Authentication': authenticationToken.toString(),
  };
  final $query = <String, List<String>>{
    if (limit != null) 'limit': [limit.toString()],
    if (marker != null) 'marker': [marker],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/api/v1/me/root',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeRootFoldersResponse.fromJson(response);
}