get method

Future<Dataset> get(
  1. String projectId,
  2. String datasetId, {
  3. String? datasetView,
  4. String? $fields,
})

Returns the dataset specified by datasetID.

Request parameters:

projectId - Project ID of the requested dataset

datasetId - Dataset ID of the requested dataset

datasetView - Specifies the view that determines which dataset information is returned. By default, metadata and ACL information are returned. Allowed values: METADATA, ACL, FULL.

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

Completes with a Dataset.

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<Dataset> get(
  core.String projectId,
  core.String datasetId, {
  core.String? datasetView,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (datasetView != null) 'datasetView': [datasetView],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'projects/' +
      commons.escapeVariable('$projectId') +
      '/datasets/' +
      commons.escapeVariable('$datasetId');

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