queryContents method
Returns the contents of a given TeamFolder.
Request parameters:
teamFolder - Required. Resource name of the TeamFolder to list contents
for. Format: projects / * /locations / * /teamFolders / * .
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/teamFolders/\[^/\]+$.
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), create_time,
last_modified_time. 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
QueryTeamFolderContents call. Provide this to retrieve the subsequent
page. When paginating, all other parameters provided to
QueryTeamFolderContents, 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 QueryTeamFolderContentsResponse.
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<QueryTeamFolderContentsResponse> queryContents(
core.String teamFolder, {
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('$teamFolder') + ':queryContents';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return QueryTeamFolderContentsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}