summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-05-31 15:00:29 +0100
committerErik Johnston <erik@matrix.org>2017-05-31 15:00:29 +0100
commit63fda37e20015f0fe56aed86f907035d42fdc2ca (patch)
tree6b284744ca2f0791cee6b0cd71c5707bce3f28cc /synapse/rest/client/v2_alpha
parentWeight differently (diff)
downloadsynapse-63fda37e20015f0fe56aed86f907035d42fdc2ca.tar.xz
Add comments
Diffstat (limited to 'synapse/rest/client/v2_alpha')
-rw-r--r--synapse/rest/client/v2_alpha/user_directory.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/user_directory.py b/synapse/rest/client/v2_alpha/user_directory.py
index fe91207195..17d3dffc8f 100644
--- a/synapse/rest/client/v2_alpha/user_directory.py
+++ b/synapse/rest/client/v2_alpha/user_directory.py
@@ -39,6 +39,22 @@ class UserDirectorySearchRestServlet(RestServlet):
 
     @defer.inlineCallbacks
     def on_POST(self, request):
+        """Searches for users in directory
+
+        Returns:
+            dict of the form::
+
+                {
+                    "limited": <bool>,  # whether there were more results or not
+                    "results": [  # Ordered by best match first
+                        {
+                            "user_id": <user_id>,
+                            "display_name": <display_name>,
+                            "avatar_url": <avatar_url>
+                        }
+                    ]
+                }
+        """
         yield self.auth.get_user_by_req(request, allow_guest=False)
         body = parse_json_object_from_request(request)