rooms.get
Get the room's metadata, status and capacity.
Import and client
import { RelayServer } from '@relayrtc/node'
const relay = new RelayServer({
apiUrl: process.env.RELAYRTC_API_URL!,
apiKey: process.env.RELAYRTC_SECRET_KEY!,
})Requirements
A secret key with rooms:read. The requested resource must belong to that key's project environment.
Parameters
| Option | Type | Default / requirement | Purpose |
|---|---|---|---|
| roomId | string | Required | ID of a room in the key's environment. |
Every method accepts RequestOptions as its final argument.
Example
const roomId = 'room_example'
const result = await relay.rooms.get(roomId)Returns
Promise<Room>. Returns a room object.
REST equivalent
GET /v1/rooms/{roomId}. Failures throw RelayApiError.