getFolderTree method
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 to1
.oCSAPIRequest
Required to be true for the API request to pass. Defaults totrue
.
Status codes:
- 200: Folder tree returned successfully
- 401: Unauthorized
- 400: Invalid folder path
- 404: Folder not found
See:
- $getFolderTree_Request for the request send by this method.
- $getFolderTree_Serializer for a converter to parse the
Response
from an executed request.
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);
}