getFolderTree method

Future<DynamiteResponse<BuiltList<FolderTree>, void>> getFolderTree({
  1. String? path,
  2. int? depth,
  3. bool? oCSAPIRequest,
})

Returns the folder tree of the user.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • path The path relative to the user folder. Defaults to "/".
  • depth The depth of the tree. Defaults to 1.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Folder tree returned successfully
  • 401: Unauthorized
  • 400: Invalid folder path
  • 404: Folder not found

See:

Implementation

Future<_i1.DynamiteResponse<BuiltList<FolderTree>, void>> getFolderTree({
  String? path,
  int? depth,
  bool? oCSAPIRequest,
}) async {
  final _request = $getFolderTree_Request(
    path: path,
    depth: depth,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _streamedResponse = await _rootClient.httpClient.send(_request);
  final _response = await _i3.Response.fromStream(_streamedResponse);

  final _serializer = $getFolderTree_Serializer();
  return _i1.ResponseConverter<BuiltList<FolderTree>, void>(_serializer).convert(_response);
}