downloadDefaults method

Future<Response> downloadDefaults(
  1. String project, {
  2. String? format,
  3. String? $fields,
})

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 Response.

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<Response> 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 response_ as core.Map<core.String, core.dynamic>;
}