list method
Lists managed folders in the given bucket.
Request parameters:
bucket
- Name of the bucket containing the managed folder.
pageSize
- Maximum number of items to return in a single page of
responses.
pageToken
- A previously-returned page token representing part of the
larger set of results to view.
prefix
- The managed folder name/path prefix to filter the output list
of results.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ManagedFolders.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<ManagedFolders> list(
core.String bucket, {
core.int? pageSize,
core.String? pageToken,
core.String? prefix,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (prefix != null) 'prefix': [prefix],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'b/' + commons.escapeVariable('$bucket') + '/managedFolders';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ManagedFolders.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}