list method
Lists a file's comments.
Request parameters:
fileId
- The ID of the file.
includeDeleted
- If set, all comments and replies, including deleted
comments and replies (with content stripped) will be returned.
maxResults
- The maximum number of discussions to include in the
response, used for paging.
Value must be between "0" and "100".
pageToken
- The continuation token, used to page through large result
sets. To get the next page of results, set this parameter to the value of
"nextPageToken" from the previous response.
updatedMin
- Only discussions that were updated after this timestamp
will be returned. Formatted as an RFC 3339 timestamp.
$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? maxResults,
core.String? pageToken,
core.String? updatedMin,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (includeDeleted != null) 'includeDeleted': ['${includeDeleted}'],
if (maxResults != null) 'maxResults': ['${maxResults}'],
if (pageToken != null) 'pageToken': [pageToken],
if (updatedMin != null) 'updatedMin': [updatedMin],
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>);
}