get method

Future<DeveloperMetadata> get(
  1. String spreadsheetId,
  2. int metadataId, {
  3. String? $fields,
})

Returns the developer metadata with the specified ID.

The caller must specify the spreadsheet ID and the developer metadata's unique metadataId. For more information, see Read, write, and search metadata.

Request parameters:

spreadsheetId - The ID of the spreadsheet to retrieve metadata from.

metadataId - The ID of the developer metadata to retrieve.

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

Completes with a DeveloperMetadata.

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<DeveloperMetadata> get(
  core.String spreadsheetId,
  core.int metadataId, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'v4/spreadsheets/' +
      commons.escapeVariable('$spreadsheetId') +
      '/developerMetadata/' +
      commons.escapeVariable('$metadataId');

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