getStudyDeploymentStatusList method

  1. @override
Future<List<StudyDeploymentStatus>> getStudyDeploymentStatusList(
  1. List<String> studyDeploymentIds
)
override

Get the statuses for a set of deployments with the specified studyDeploymentIds.

Implementation

@override
Future<List<StudyDeploymentStatus>> getStudyDeploymentStatusList(
    List<String> studyDeploymentIds) async {
  // fast out if not ids specified
  if (studyDeploymentIds.isEmpty) return [];

  Map<String, dynamic> responseJson =
      await _rpc(GetStudyDeploymentStatusList(studyDeploymentIds));

  // we expect a list of 'items'
  List<Map<String, dynamic>> items = json
      .decode(responseJson['items'].toString()) as List<Map<String, dynamic>>;
  List<StudyDeploymentStatus> statusList = [];
  for (var item in items) {
    statusList.add(StudyDeploymentStatus.fromJson(item));
  }

  return statusList;
}