getRecordingSearchResults method

Future<List<FindRecordingResult>> getRecordingSearchResults(
  1. String searchToken, {
  2. int? minResults,
  3. int? maxResults,
  4. String? waitTime,
})

GetRecordingSearchResults acquires the results from a recording search session previously initiated by a FindRecordings operation. The response shall not include results already returned in previous requests for the same session. If MaxResults is specified, the response shall not contain more than MaxResults results. The number of results relates to the number of recordings. For viewing individual recorded data for a signal track use the FindEvents method.

GetRecordingSearchResults shall block until:

  • MaxResults results are available for the response if MaxResults is specified.
  • MinResults results are available for the response if MinResults is specified.
  • WaitTime has expired.
  • Search is completed or stopped. This operation is mandatory to support for a device implementing the recording search service.

ACCESS CLASS: READ_MEDIA

Implementation

Future<List<FindRecordingResult>> getRecordingSearchResults(
  String searchToken, {
  int? minResults,
  int? maxResults,
  String? waitTime,
}) async {
  loggy.debug('getRecordingSearchResults');

  final responseEnvelope = await transport.securedRequest(
      uri,
      soap.Body(
        request: SearchRequest.getRecordingSearchResults(
          searchToken,
          minResults: minResults,
          maxResults: maxResults,
          waitTime: waitTime,
        ),
      ));

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

  return GetRecordingSearchResultsResponse.fromJson(
          responseEnvelope.body.response!)
      .findRecordingResults;
}