Skip to content

Commit

Permalink
add documentation for #433
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Mar 21, 2017
1 parent a41e6cb commit 3dac051
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flask_socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,8 @@ def on_join(data):
:param room: The name of the room to join.
:param sid: The session id of the client. If not provided, the client is
obtained from the request context.
:param namespace: The namespace for the room. If not provided, the
namespace is obtained from the request context.
"""
socketio = flask.current_app.extensions['socketio']
sid = sid or flask.request.sid
Expand All @@ -730,6 +732,8 @@ def on_leave(data):
:param room: The name of the room to leave.
:param sid: The session id of the client. If not provided, the client is
obtained from the request context.
:param namespace: The namespace for the room. If not provided, the
namespace is obtained from the request context.
"""
socketio = flask.current_app.extensions['socketio']
sid = sid or flask.request.sid
Expand All @@ -744,6 +748,8 @@ def close_room(room, namespace=None):
the room from the server.
:param room: The name of the room to close.
:param namespace: The namespace for the room. If not provided, the
namespace is obtained from the request context.
"""
socketio = flask.current_app.extensions['socketio']
namespace = namespace or flask.request.namespace
Expand All @@ -758,6 +764,8 @@ def rooms(sid=None, namespace=None):
:param sid: The session id of the client. If not provided, the client is
obtained from the request context.
:param namespace: The namespace for the room. If not provided, the
namespace is obtained from the request context.
"""
socketio = flask.current_app.extensions['socketio']
sid = sid or flask.request.sid
Expand Down

0 comments on commit 3dac051

Please sign in to comment.