joinRoom method

Future<DynamiteResponse<RoomJoinRoomResponseApplicationJson, void>> joinRoom({
  1. required String token,
  2. String? password,
  3. int? force,
  4. RoomJoinRoomApiVersion? apiVersion,
  5. bool? oCSAPIRequest,
})

Join a room.

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:

  • password Password of the room. Defaults to ''.
  • force Create a new session if necessary. Defaults to 1.
  • apiVersion Defaults to v4.
  • token Token of the room.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Room joined successfully
  • 403: Joining room is not allowed
  • 404: Room not found
  • 409: Session already exists

See:

Implementation

Future<DynamiteResponse<RoomJoinRoomResponseApplicationJson, void>> joinRoom({
  required String token,
  String? password,
  int? force,
  RoomJoinRoomApiVersion? apiVersion,
  bool? oCSAPIRequest,
}) async {
  final rawResponse = joinRoomRaw(
    token: token,
    password: password,
    force: force,
    apiVersion: apiVersion,
    oCSAPIRequest: oCSAPIRequest,
  );

  return rawResponse.future;
}