downloadDefaults method
Get a project's current Remote Config template parameters and default values in JSON, property list (plist), or XML format.
Request parameters:
project
- Required. The Firebase project's Project ID or Project Number,
prefixed with "projects/".
Value must have pattern ^projects/\[^/\]+$
.
format
- Required. The file structure to return.
Possible string values are:
- "FORMAT_UNSPECIFIED" : Catch-all for unrecognized enum values.
- "XML" : Returns a response in XML format.
- "PLIST" : Returns a response in property list (plist) format.
- "JSON" : Returns a response in JSON format.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a HttpBody.
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<HttpBody> downloadDefaults(
core.String project, {
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('$project') +
'/remoteConfig:downloadDefaults';
final _response = await _requester.request(
_url,
'GET',
queryParams: _queryParams,
);
return HttpBody.fromJson(_response as core.Map<core.String, core.dynamic>);
}