getRecordingJobs method

GetRecordingJobs shall return a list of all the recording jobs in the device.

ACCESS CLASS: READ_MEDIA

Implementation

Future<List<GetRecordingJobsResponseItem>> getRecordingJobs() async {
  loggy.debug('getRecordingJobs');

  final responseEnvelope = await transport.securedRequest(
    uri,
    soap.Body(
      request: RecordingsRequest.getRecordingJobs(),
    ),
  );

  if (responseEnvelope.body.hasFault) {
    throw Exception(responseEnvelope.body.fault.toString());
  }

  return GetRecordingJobsResponse.fromJson(responseEnvelope.body.response!)
      .jobItems;
}