Retrieve a list of rooms
You can retrieve a list of rooms by using the parameters in SbRoomListQuery
as filters. The following table shows all supported filters for SbRoomListQuery
to search for specific rooms you want to retrieve.
Property name | Type | Description |
---|---|---|
Limit | int | Filters query results to include the specified the number of results to return per page. Acceptable values are |
RoomIds | List< String > | Filters query results to include the specified unique identifiers for the rooms. |
RoomState | SbRoomState? | Filters query results to include room with the specified room state. Acceptable values are the following: |
CurrentParticipantCountRange | SbRange | Filters query results to include rooms with the specified range of numbers for current participants. |
CreatedByUserIds | List< String > | Filters query results to include rooms that were created by specified user IDs. |
CreatedAtRange | List< String > | Filters query results to include rooms that were created between the specified range of time. |
You can specify the filters as the following.
To retrieve the list of rooms you specified using the filters, call the SbRoomListQuery.Next(SbRoomListQueryHandler)
method.
After retrieving the list of rooms, the user can select a room they wish to enter using the following code.
Note: The room data returned is updated only after a user has entered the room. To update the details about a room, call the
SendbirdCall.FetchRoomById()
method.