getStatus method

Future<PtzStatus> getStatus(
  1. String profileToken
)

Operation to request PTZ status for the Node in the selected profile.

ACCESS CLASS: READ_MEDIA

Implementation

Future<PtzStatus> getStatus(String profileToken) async {
  loggy.debug('getStatus');

  final responseEnvelope = await transport.securedRequest(
      uri,
      soap.Body(
        request: PtzRequest.getStatus(profileToken),
      ));

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

  return GetStatusResponse.fromJson(responseEnvelope.body.response!)
      .ptzStatus;
}