get method

Future<GoogleApiHttpBody> get(
  1. String name, {
  2. String? format,
  3. String? $fields,
})

Gets an API proxy revision.

To download the API proxy configuration bundle for the specified revision as a zip file, set the format query parameter to bundle. If you are using curl, specify -o filename.zip to save the output to a file; otherwise, it displays to stdout. Then, develop the API proxy configuration locally and upload the updated API proxy configuration revision, as described in [updateApiProxyRevision](updateApiProxyRevision).

Request parameters:

name - Required. API proxy revision in the following format: organizations/{org}/apis/{api}/revisions/{rev} Value must have pattern ^organizations/\[^/\]+/apis/\[^/\]+/revisions/\[^/\]+$.

format - Format used when downloading the API proxy configuration revision. Set to bundle to download the API proxy configuration revision as a zip file.

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

Completes with a GoogleApiHttpBody.

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

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

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