get method
Gets the specified release for a site or channel.
When used to get a release for a site, this can get releases for both the
default live
channel and any active preview channels for the specified
site.
Request parameters:
name
- Required. The fully-qualified resource name for the Hosting
release, in either of the following formats: -
sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID -
sites/SITE_ID/releases/RELEASE_ID
Value must have pattern
^sites/\[^/\]+/channels/\[^/\]+/releases/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Release.
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<Release> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1beta1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Release.fromJson(response_ as core.Map<core.String, core.dynamic>);
}