list method

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

Lists notes.

Every list call returns a page of results with page_size as the upper bound of returned items. A page_size of zero allows the server to choose the upper bound. The ListNotesResponse contains at most page_size entries. If there are more things left to list, it provides a next_page_token value. (Page tokens are opaque values.) To get the next page of results, copy the result's next_page_token into the next request's page_token. Repeat until the next_page_token returned with a page of results is empty. ListNotes return consistent results in the face of concurrent changes, or signals that it cannot with an ABORTED error.

Request parameters:

filter - Filter for list results. If no filter is supplied, the trashed filter is applied by default. Valid fields to filter by are: create_time, update_time, trash_time, and trashed. Filter syntax follows the Google AIP filtering spec.

pageSize - The maximum number of results to return.

pageToken - The previous page's next_page_token field.

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

Completes with a ListNotesResponse.

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<ListNotesResponse> list({
  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],
  };

  const url_ = 'v1/notes';

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