ApiService

interface ApiService

Functions

Link copied to clipboard
@POST(value = "create")
abstract suspend fun createSession(@Body request: CreateSessionRequest): Response<CreateSessionResponse>

Creates or initializes a host session for the selected language.

Link copied to clipboard
@HTTP(method = "DELETE", path = "delete", hasBody = true)
abstract suspend fun deleteSession(@Body request: DeleteSessionRequest): Response<Unit>

Deletes an active host session.

Link copied to clipboard
@POST(value = "join")
abstract suspend fun joinSession(@Body request: JoinSessionRequest): Response<JoinSessionResponse>

Joins an existing room using join token + language.

Link copied to clipboard
@HTTP(method = "DELETE", path = "leave", hasBody = true)
abstract suspend fun leaveSession(@Body request: LeaveSessionRequest): Response<Unit>

Leaves the current room session.

Link copied to clipboard
@PUT(value = "login")
abstract suspend fun login(@Body request: LoginRequest): LoginResponse

Authenticates a user and returns host/join authorization tokens.

Link copied to clipboard
@HTTP(method = "DELETE", path = "logout", hasBody = true)
abstract suspend fun logout(@Body request: LogoutRequest): Response<Unit>

Logs out the current session.