list method
Lists documents for the authenticated caller with cursor pagination.
Each returned document includes its latest_review_summary when a review
exists.
Request parameters:
filter - Optional. Custom filter expressions are not currently
supported; non-empty values return INVALID_ARGUMENT.
orderBy - Optional. Custom order_by expressions are not currently
supported; non-empty values return INVALID_ARGUMENT.
pageSize - Optional. The maximum number of documents to return in a
single page. The server may return fewer than this value. If unspecified,
at most 50 documents will be returned. The maximum value is 100; values
above 100 will be coerced to 100.
pageToken - Optional. A page token received from a previous
ListDocuments call.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListDocumentsResponse.
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<ListDocumentsResponse> list({
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],
};
const url_ = 'v1/documents';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListDocumentsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}