joinRoom method
Future<DynamiteResponse<RoomJoinRoomResponseApplicationJson, void> >
joinRoom({
- required String token,
- String? password,
- int? force,
- RoomJoinRoomApiVersion? apiVersion,
- 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 to1
.apiVersion
Defaults tov4
.token
Token of the room.oCSAPIRequest
Required to be true for the API request to pass. Defaults totrue
.
Status codes:
- 200: Room joined successfully
- 403: Joining room is not allowed
- 404: Room not found
- 409: Session already exists
See:
- joinRoomRaw for an experimental operation that returns a DynamiteRawResponse that can be serialized.
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;
}