listVersions method

Future<ListVersionsResponse> listVersions(
  1. String project, {
  2. String? endTime,
  3. String? endVersionNumber,
  4. int? pageSize,
  5. String? pageToken,
  6. String? startTime,
  7. String? $fields,
})

Get a list of Remote Config template versions that have been published, sorted in reverse chronological order.

Only the last 300 versions are stored. All versions that correspond to non-active Remote Config templates (i.e., all except the template that is being fetched by clients) are also deleted if they are older than 90 days.

Request parameters:

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

endTime - Optional. Specify the latest update time to include in the results; any entries updated on or after this time are omitted.

endVersionNumber - Optional. Specify the newest version number to include in the results. If specified, must be greater than zero. Defaults to the newest version.

pageSize - Optional. The maximum number of items to return per page.

pageToken - Optional. The next_page_token value returned from a previous List request, if any.

startTime - Optional. Specify the earliest update time to include in the results; any entries updated before this time are omitted.

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

Completes with a ListVersionsResponse.

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<ListVersionsResponse> listVersions(
  core.String project, {
  core.String? endTime,
  core.String? endVersionNumber,
  core.int? pageSize,
  core.String? pageToken,
  core.String? startTime,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (endTime != null) 'endTime': [endTime],
    if (endVersionNumber != null) 'endVersionNumber': [endVersionNumber],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (startTime != null) 'startTime': [startTime],
    if ($fields != null) 'fields': [$fields],
  };

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

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