getFunctionsDeployments method

Future<FnList?> getFunctionsDeployments()

Is what is live right now — each function's current record IS its live deployment, so this is the deployment inventory.

Is what is live right now — each function's current record IS its live deployment, so this is the deployment inventory. There is no deployment history behind it: a function has one record, and publishing replaces it. The 7-day rollup is deliberately absent here, because this read is about what is deployed rather than about how it has performed.

Implementation

Future<FnList?> getFunctionsDeployments() async {
  final response = await getFunctionsDeploymentsWithHttpInfo();
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FnList',) as FnList;

  }
  return null;
}