list method

Future<TableDataList> list(
  1. String projectId,
  2. String datasetId,
  3. String tableId, {
  4. String? formatOptions_timestampOutputFormat,
  5. bool? formatOptions_useInt64Timestamp,
  6. int? maxResults,
  7. String? pageToken,
  8. String? selectedFields,
  9. String? startIndex,
  10. 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_timestampOutputFormat - Optional. The API output format for a timestamp. This offers more explicit control over the timestamp output format as compared to the existing use_int64_timestamp option. Possible string values are:

  • "TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED" : Corresponds to default API output behavior, which is FLOAT64.
  • "FLOAT64" : Timestamp is output as float64 seconds since Unix epoch.
  • "INT64" : Timestamp is output as int64 microseconds since Unix epoch.
  • "ISO8601_STRING" : Timestamp is output as ISO 8601 String ("YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ").

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.String? formatOptions_timestampOutputFormat,
  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>>{
    'formatOptions.timestampOutputFormat':
        ?formatOptions_timestampOutputFormat == null
        ? null
        : [formatOptions_timestampOutputFormat],
    'formatOptions.useInt64Timestamp':
        ?formatOptions_useInt64Timestamp == null
        ? null
        : ['${formatOptions_useInt64Timestamp}'],
    'maxResults': ?maxResults == null ? null : ['${maxResults}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'selectedFields': ?selectedFields == null ? null : [selectedFields],
    'startIndex': ?startIndex == null ? null : [startIndex],
    'fields': ?$fields == null ? null : [$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>,
  );
}