list method

Future<ListFormResponsesResponse> list(
  1. String formId, {
  2. String? filter,
  3. int? pageSize,
  4. String? pageToken,
  5. String? $fields,
})

List a form's responses.

Request parameters:

formId - Required. ID of the Form whose responses to list.

filter - Which form responses to return. Currently, the only supported filters are: * timestamp > N which means to get all form responses submitted after (but not at) timestamp N. * timestamp >= N which means to get all form responses submitted at and after timestamp N. For both supported filters, timestamp must be formatted in RFC3339 UTC "Zulu" format. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

pageSize - The maximum number of responses to return. The service may return fewer than this value. If unspecified or zero, at most 5000 responses are returned.

pageToken - A page token returned by a previous list response. If this field is set, the form and the values of the filter must be the same as for the original request.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListFormResponsesResponse.

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<ListFormResponsesResponse> list(
  core.String formId, {
  core.String? filter,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (filter != null) 'filter': [filter],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/forms/' + commons.escapeVariable('$formId') + '/responses';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListFormResponsesResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}