list method

Future<TableDataList> list(
  1. String projectId,
  2. String datasetId,
  3. String tableId, {
  4. bool? formatOptions_useInt64Timestamp,
  5. int? maxResults,
  6. String? pageToken,
  7. String? selectedFields,
  8. String? startIndex,
  9. String? $fields,
})

List the content of a table in rows.

Request parameters:

projectId - Required. Project id of the table to list. Value must have pattern ^\[^/\]+$.

datasetId - Required. Dataset id of the table to list. Value must have pattern ^\[^/\]+$.

tableId - Required. Table id of the table to list. Value must have pattern ^\[^/\]+$.

formatOptions_useInt64Timestamp - Optional. Output timestamp as usec int64. Default is false.

maxResults - Row limit of the table.

pageToken - To retrieve the next page of table data, set this field to the string provided in the pageToken field of the response body from your previous call to tabledata.list.

selectedFields - Subset of fields to return, supports select into sub fields. Example: selected_fields = "a,e.d.f";

startIndex - Start row index of the table.

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

Completes with a TableDataList.

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<TableDataList> list(
  core.String projectId,
  core.String datasetId,
  core.String tableId, {
  core.bool? formatOptions_useInt64Timestamp,
  core.int? maxResults,
  core.String? pageToken,
  core.String? selectedFields,
  core.String? startIndex,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (formatOptions_useInt64Timestamp != null)
      'formatOptions.useInt64Timestamp': [
        '${formatOptions_useInt64Timestamp}'
      ],
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (selectedFields != null) 'selectedFields': [selectedFields],
    if (startIndex != null) 'startIndex': [startIndex],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'projects/' +
      core.Uri.encodeFull('$projectId') +
      '/datasets/' +
      core.Uri.encodeFull('$datasetId') +
      '/tables/' +
      core.Uri.encodeFull('$tableId') +
      '/data';

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