summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-03 17:34:07 +0000
committerErik Johnston <erik@matrix.org>2015-02-03 17:34:07 +0000
commit02be8da5e11d9abcfc962f962bbc4e9940b69199 (patch)
treed12a5dd2654ba7eb333d2b0778411d2af58b3e85 /synapse/storage/__init__.py
parentNew line (diff)
downloadsynapse-02be8da5e11d9abcfc962f962bbc4e9940b69199.tar.xz
Add doc to get_event
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 93aefe0c48..93ab26fcd1 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -131,6 +131,21 @@ class DataStore(RoomMemberStore, RoomStore,
     def get_event(self, event_id, check_redacted=True,
                   get_prev_content=False, allow_rejected=False,
                   allow_none=False):
+        """Get an event from the database by event_id.
+
+        Args:
+            event_id (str): The event_id of the event to fetch
+            check_redacted (bool): If True, check if event has been redacted
+                and redact it.
+            get_prev_content (bool): If True and event is a state event,
+                include the previous states content in the unsigned field.
+            allow_rejected (bool): If True return rejected events.
+            allow_none (bool): If True, return None if no event found, if
+                False throw an exception.
+
+        Returns:
+            Deferred : A FrozenEvent.
+        """
         event = yield self.runInteraction(
             "get_event", self._get_event_txn,
             event_id,