getOrCreateCallWithHttpInfo method
Future<Response>
getOrCreateCallWithHttpInfo(
- String type,
- String id,
- GetOrCreateCallRequest getOrCreateCallRequest, {
- String? connectionId,
Get or create a call
Gets or creates a new call Sends events: - call.created - call.notification - call.ring Required permissions: - CreateCall - ReadCall - UpdateCallSettings
Note: This method returns the HTTP Response
.
Parameters:
-
String type (required):
-
String id (required):
-
GetOrCreateCallRequest getOrCreateCallRequest (required):
-
String connectionId:
Implementation
Future<Response> getOrCreateCallWithHttpInfo(
String type,
String id,
GetOrCreateCallRequest getOrCreateCallRequest, {
String? connectionId,
}) async {
// ignore: prefer_const_declarations
final path = r'/video/call/{type}/{id}'
.replaceAll('{type}', type)
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody = getOrCreateCallRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (connectionId != null) {
queryParams.addAll(_queryParams('', 'connection_id', connectionId));
}
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}