queryUserRootContents method
Returns the contents of a caller's root folder in a given location.
The root folder contains all resources that are created by the user and not contained in any other folder.
Request parameters:
location - Required. Location of the user root folder to list contents
for. Format: projects / * /locations / *
Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.
filter - Optional. Optional filtering for the returned list. Filtering
is currently only supported on the display_name field. Example: *
filter="display_name="MyFolder""
orderBy - Optional. Field to additionally sort results by. Will order
Folders before Repositories, and then by order_by in ascending order.
Supported keywords: display_name (default), created_at, last_modified_at.
Examples: * orderBy="display_name" * orderBy="display_name desc"
pageSize - Optional. Maximum number of paths to return. The server may
return fewer items than requested. If unspecified, the server will pick an
appropriate default.
pageToken - Optional. Page token received from a previous
QueryUserRootContents call. Provide this to retrieve the subsequent
page. When paginating, all other parameters provided to
QueryUserRootFolderContents, with the exception of page_size, must
match the call that provided the page token.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a QueryUserRootContentsResponse.
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<QueryUserRootContentsResponse> queryUserRootContents(
core.String location, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'orderBy': ?orderBy == null ? null : [orderBy],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$location') + ':queryUserRootContents';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return QueryUserRootContentsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}