callNotificationState method
Future<DynamiteResponse<CallNotificationStateResponseApplicationJson, void> >
callNotificationState({
- required String token,
- CallNotificationStateApiVersion? apiVersion,
- bool? oCSAPIRequest,
Check the expected state of a call notification.
Required capability: call-notification-state-api.
Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers.
Throws a DynamiteApiException if the API call does not return an expected status code.
Parameters:
apiVersionDefaults to"v4".tokenConversation token to check.oCSAPIRequestRequired to be true for the API request to pass. Defaults totrue.
Status codes:
- 200: Notification should be kept alive
- 201: Dismiss call notification and show "Missed call"-notification instead
- 403: Not logged in, try again with auth data sent
- 404: Dismiss call notification
See:
- $callNotificationState_Request for the request send by this method.
- $callNotificationState_Serializer for a converter to parse the
Responsefrom an executed request.
Implementation
Future<_i1.DynamiteResponse<CallNotificationStateResponseApplicationJson, void>> callNotificationState({
required String token,
CallNotificationStateApiVersion? apiVersion,
bool? oCSAPIRequest,
}) async {
final _request = $callNotificationState_Request(token: token, apiVersion: apiVersion, oCSAPIRequest: oCSAPIRequest);
final _streamedResponse = await _rootClient.httpClient.send(_request);
final _response = await _i3.Response.fromStream(_streamedResponse);
final _serializer = $callNotificationState_Serializer();
return _i1.ResponseConverter<CallNotificationStateResponseApplicationJson, void>(_serializer).convert(_response);
}