joinCall method
Future<DynamiteResponse<CallJoinCallResponseApplicationJson, void> >
joinCall({
- required String token,
- int? flags,
- int? forcePermissions,
- CallJoinCallSilent? silent,
- CallJoinCallRecordingConsent? recordingConsent,
- CallJoinCallApiVersion? apiVersion,
- bool? oCSAPIRequest,
Join a call.
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:
flags
In-Call flags.forcePermissions
In-call permissions.silent
Join the call silently. Defaults to0
.recordingConsent
When the user ticked a checkbox and agreed with being recorded (Only needed when theconfig => call => recording-consent
capability is set to {@see RecordingService::CONSENT_REQUIRED_YES} or the capability is {@see RecordingService::CONSENT_REQUIRED_OPTIONAL} and the conversationrecordingConsent
value is {@see RecordingService::CONSENT_REQUIRED_YES} ). Defaults to0
.apiVersion
Defaults to"v4"
.token
oCSAPIRequest
Required to be true for the API request to pass. Defaults totrue
.
Status codes:
- 200: Call joined successfully
- 404: Call not found
- 400: No recording consent was given
See:
- $joinCall_Request for the request send by this method.
- $joinCall_Serializer for a converter to parse the
Response
from an executed request.
Implementation
Future<_i1.DynamiteResponse<CallJoinCallResponseApplicationJson, void>> joinCall({
required String token,
int? flags,
int? forcePermissions,
CallJoinCallSilent? silent,
CallJoinCallRecordingConsent? recordingConsent,
CallJoinCallApiVersion? apiVersion,
bool? oCSAPIRequest,
}) async {
final _request = $joinCall_Request(
token: token,
flags: flags,
forcePermissions: forcePermissions,
silent: silent,
recordingConsent: recordingConsent,
apiVersion: apiVersion,
oCSAPIRequest: oCSAPIRequest,
);
final _response = await _rootClient.httpClient.send(_request);
final _serializer = $joinCall_Serializer();
final _rawResponse =
await _i1.ResponseConverter<CallJoinCallResponseApplicationJson, void>(_serializer).convert(_response);
return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}