list method

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

Lists queries created by the current user.

Request parameters:

orderBy - Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a " desc" suffix. For example "metadata.title desc". Sorting is only supported for the following fields: * queryId * metadata.title

pageSize - Maximum number of results per page. Must be between 1 and 100. Defaults to 100 if unspecified.

pageToken - A page token, received from a previous list call. Provide this to retrieve the subsequent page of queries.

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

Completes with a ListQueriesResponse.

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

  const url_ = 'queries';

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