@@ -74,7 +74,7 @@ defmodule Jellyfish.Room do
74
74
}
75
75
76
76
@ doc """
77
- List metadata of all of the rooms.
77
+ Lists metadata of all of the rooms.
78
78
"""
79
79
@ spec get_all ( Client . t ( ) ) :: { :ok , [ t ( ) ] } | { :error , atom ( ) | String . t ( ) }
80
80
def get_all ( client ) do
@@ -89,7 +89,7 @@ defmodule Jellyfish.Room do
89
89
end
90
90
91
91
@ doc """
92
- Get metadata of the room with `room_id`.
92
+ Gets metadata of the room with `room_id`.
93
93
"""
94
94
@ spec get ( Client . t ( ) , id ( ) ) :: { :ok , t ( ) } | { :error , atom ( ) | String . t ( ) }
95
95
def get ( client , room_id ) do
@@ -105,7 +105,13 @@ defmodule Jellyfish.Room do
105
105
end
106
106
107
107
@ doc """
108
- Create a room.
108
+ Creates a new room.
109
+
110
+ Returns an address of Jellyfish where the room was created.
111
+ When running Jellyfish in a cluster, this address might be different
112
+ than the one used in the initial call.
113
+ Therefore, it is important to call `Jellyfish.Client.update_address/2`
114
+ before subsequent operations like adding peers or components.
109
115
"""
110
116
@ spec create ( Client . t ( ) , options ( ) ) :: { :ok , t ( ) , String . t ( ) } | { :error , atom ( ) | String . t ( ) }
111
117
def create ( client , opts \\ [ ] ) do
@@ -130,7 +136,7 @@ defmodule Jellyfish.Room do
130
136
end
131
137
132
138
@ doc """
133
- Delete the room with `room_id`.
139
+ Deletes the room with `room_id`.
134
140
"""
135
141
@ spec delete ( Client . t ( ) , id ( ) ) :: :ok | { :error , atom ( ) | String . t ( ) }
136
142
def delete ( client , room_id ) do
@@ -141,7 +147,7 @@ defmodule Jellyfish.Room do
141
147
end
142
148
143
149
@ doc """
144
- Add a peer to the room with `room_id`.
150
+ Adds a peer to the room with `room_id`.
145
151
"""
146
152
@ spec add_peer ( Client . t ( ) , id ( ) , Peer . options ( ) | Peer . type ( ) ) ::
147
153
{ :ok , Peer . t ( ) , peer_token ( ) } | { :error , atom ( ) | String . t ( ) }
@@ -169,7 +175,7 @@ defmodule Jellyfish.Room do
169
175
end
170
176
171
177
@ doc """
172
- Delete the peer with `peer_id` from the room with `room_id`.
178
+ Deletes the peer with `peer_id` from the room with `room_id`.
173
179
"""
174
180
@ spec delete_peer ( Client . t ( ) , id ( ) , Peer . id ( ) ) :: :ok | { :error , atom ( ) | String . t ( ) }
175
181
def delete_peer ( client , room_id , peer_id ) do
@@ -183,7 +189,7 @@ defmodule Jellyfish.Room do
183
189
end
184
190
185
191
@ doc """
186
- Add component to the room with `room_id`.
192
+ Adds a component to the room with `room_id`.
187
193
"""
188
194
@ spec add_component ( Client . t ( ) , id ( ) , Component . options ( ) | Component . type ( ) ) ::
189
195
{ :ok , Component . t ( ) } | { :error , atom ( ) | String . t ( ) }
@@ -211,7 +217,7 @@ defmodule Jellyfish.Room do
211
217
end
212
218
213
219
@ doc """
214
- Delete the component with `component_id` from the room with `room_id`.
220
+ Deletes the component with `component_id` from the room with `room_id`.
215
221
"""
216
222
@ spec delete_component ( Client . t ( ) , id ( ) , Component . id ( ) ) :: :ok | { :error , atom ( ) | String . t ( ) }
217
223
def delete_component ( client , room_id , component_id ) do
0 commit comments