list method
Lists a file's comments.
Request parameters:
fileId
- The ID of the file.
includeDeleted
- Whether to include deleted comments. Deleted comments
will not include their original content.
pageSize
- The maximum number of comments to return per page.
Value must be between "1" and "100".
pageToken
- The token for continuing a previous list request on the next
page. This should be set to the value of 'nextPageToken' from the previous
response.
startModifiedTime
- The minimum value of 'modifiedTime' for the result
comments (RFC 3339 date-time).
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a CommentList.
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<CommentList> list(
core.String fileId, {
core.bool? includeDeleted,
core.int? pageSize,
core.String? pageToken,
core.String? startModifiedTime,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (includeDeleted != null) 'includeDeleted': ['${includeDeleted}'],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (startModifiedTime != null) 'startModifiedTime': [startModifiedTime],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'files/' + commons.escapeVariable('$fileId') + '/comments';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return CommentList.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}