Class: Api
Client for the DriftDB Room API. This is used to create new rooms and get information about existing rooms.
Constructors
constructor
• new Api(apiUrl)
Create a new DriftDB Room API client.
Parameters
| Name | Type | Description |
|---|---|---|
apiUrl | string | The base URL of the DriftDB Room API. |
Defined in
js-pkg/packages/driftdb/src/api.ts:32
Properties
apiUrl
• apiUrl: string
Defined in
js-pkg/packages/driftdb/src/api.ts:25
Methods
getRoom
▸ getRoom(roomId): Promise<RoomResult>
Get information about an existing room.
Parameters
| Name | Type | Description |
|---|---|---|
roomId | string | The ID of the room to get information about. |
Returns
Promise<RoomResult>
The room information.
Defined in
js-pkg/packages/driftdb/src/api.ts:58
newRoom
▸ newRoom(): Promise<RoomResult>
Ask the DriftDB server to create a new room and return its information.
Returns
Promise<RoomResult>
The room information.