# `Chatto.Api.V1.RoomDirectoryService`
[🔗](https://github.com/xtian/elixir-chatto/blob/v0.1.0/lib/chatto/generated/chatto_api_v1_room_directory_service.ex#L3)

Reads room directory data.

# `batch_get_room_groups`

```elixir
@spec batch_get_room_groups(
  Req.Request.t(),
  Chatto.Api.V1.BatchGetRoomGroupsRequest.t()
) ::
  {:ok, Chatto.Api.V1.BatchGetRoomGroupsResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Returns ordered room groups for a set of stable group IDs. Hidden room
entries are omitted. Archived room entries are omitted. Unknown groups are
omitted. Results preserve first-seen request order and repeated IDs are
de-duplicated.

# `batch_get_rooms`

```elixir
@spec batch_get_rooms(Req.Request.t(), Chatto.Api.V1.BatchGetRoomsRequest.t()) ::
  {:ok, Chatto.Api.V1.BatchGetRoomsResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Returns visible rooms for a set of stable room IDs. This is a direct
hydration API, so visible archived rooms may be returned. Unknown rooms and
rooms hidden from the caller are omitted. Results preserve first-seen
request order and repeated IDs are de-duplicated.

# `get_room`

```elixir
@spec get_room(Req.Request.t(), Chatto.Api.V1.GetRoomRequest.t()) ::
  {:ok, Chatto.Api.V1.GetRoomResponse.t()} | {:error, Chatto.Connect.Error.t()}
```

Returns one visible room by ID. DM rooms require membership. Returns
NOT_FOUND when the room does not exist and PERMISSION_DENIED when the room
exists but is hidden from the caller.

# `get_room_group`

```elixir
@spec get_room_group(Req.Request.t(), Chatto.Api.V1.GetRoomGroupRequest.t()) ::
  {:ok, Chatto.Api.V1.GetRoomGroupResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Returns one ordered room group by ID. Hidden room entries are omitted.
Archived room entries are omitted.
Returns NOT_FOUND when the room group does not exist.

# `list_room_groups`

```elixir
@spec list_room_groups(Req.Request.t(), Chatto.Api.V1.ListRoomGroupsRequest.t()) ::
  {:ok, Chatto.Api.V1.ListRoomGroupsResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Lists ordered channel room groups and sidebar items visible to the current
user as a finite navigation snapshot. Hidden room entries are omitted.
Archived room entries are omitted.

# `list_rooms`

```elixir
@spec list_rooms(Req.Request.t(), Chatto.Api.V1.ListRoomsRequest.t()) ::
  {:ok, Chatto.Api.V1.ListRoomsResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Lists rooms visible to the current user. Defaults to active rooms; use
archive_filter to discover archived rooms or include both states. Channel
rooms require membership or room.list. DM membership exposes room and
participant metadata. Message-derived DM state also requires current
read permission. Accessible empty DMs are included. Returns up to 100 rooms
ordered by ID ascending; the default page size is 50.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
