getUploadBuilds static method

Future<List<AppBuildSummary>> getUploadBuilds(
  1. Client cloudApiClient, {
  2. required String projectId,
  3. required UuidValue uploadId,
})

Returns the app builds made from the archive upload uploadId in project projectId, in platform order.

Throws FailureException if the upload has no builds in the project, or if they cannot be fetched.

Implementation

static Future<List<AppBuildSummary>> getUploadBuilds(
  Client cloudApiClient, {
  required String projectId,
  required UuidValue uploadId,
}) async {
  try {
    return await cloudApiClient.appBuilds.getUploadBuilds(
      cloudCapsuleId: projectId,
      uploadId: uploadId,
    );
  } on NotFoundException catch (e) {
    throw FailureException(error: e.message);
  } on AppPublishingDisabledException catch (e) {
    throw FailureException(error: e.message);
  } on Exception catch (e, stackTrace) {
    throw FailureException.nested(
      e,
      stackTrace,
      'Failed to fetch the app builds of the upload $uploadId.',
    );
  }
}