joinCallWithHttpInfo method

Future<Response> joinCallWithHttpInfo(
  1. String type,
  2. String id,
  3. JoinCallRequest joinCallRequest, {
  4. String? connectionId,
})

Join call

Request to join a call Required permissions: - CreateCall - JoinCall

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> joinCallWithHttpInfo(
  String type,
  String id,
  JoinCallRequest joinCallRequest, {
  String? connectionId,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/video/call/{type}/{id}/join'
      .replaceAll('{type}', type)
      .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody = joinCallRequest;

  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,
  );
}