getRemoteConfig method

Future<RemoteConfig> getRemoteConfig(
  1. String project, {
  2. String? versionNumber,
  3. String? $fields,
})

Get a project's Remote Config template and associated ETag header.

Returns the requested RemoteConfig as the payload and an ETag as a response header.

Request parameters:

project - Required. The Firebase project's Project ID or Project Number, prefixed with "projects/". Value must have pattern ^projects/\[^/\]+$.

versionNumber - Optional. Version number of the RemoteConfig to look up. If not specified, the latest RemoteConfig will be returned.

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

Completes with a RemoteConfig.

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<RemoteConfig> getRemoteConfig(
  core.String project, {
  core.String? versionNumber,
  core.String? $fields,
}) async {
  final _queryParams = <core.String, core.List<core.String>>{
    if (versionNumber != null) 'versionNumber': [versionNumber],
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'v1/' + core.Uri.encodeFull('$project') + '/remoteConfig';

  final _response = await _requester.request(
    _url,
    'GET',
    queryParams: _queryParams,
  );
  return RemoteConfig.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}