summary refs log tree commit diff
path: root/docs/client-server/swagger_matrix/events
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-27 15:41:19 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-27 15:41:38 +0100
commitabe2035d8518d334910024cbf20f0917781d317e (patch)
tree8aa08b2025f4647a963d10d22cbdac9723c6293a /docs/client-server/swagger_matrix/events
parentBF: use room_id if there is no alias (diff)
downloadsynapse-abe2035d8518d334910024cbf20f0917781d317e.tar.xz
api docs: Finished adding all C-S APIs. Added initialSync, publicRooms, membership changes (generic and RPCy) and directory paths.
Diffstat (limited to 'docs/client-server/swagger_matrix/events')
-rw-r--r--docs/client-server/swagger_matrix/events134
1 files changed, 134 insertions, 0 deletions
diff --git a/docs/client-server/swagger_matrix/events b/docs/client-server/swagger_matrix/events
index e8b96861f5..ca69d34db5 100644
--- a/docs/client-server/swagger_matrix/events
+++ b/docs/client-server/swagger_matrix/events
@@ -67,6 +67,38 @@
           ]
         }
       ]
+    },
+    {
+      "path": "/initialSync",
+      "operations": [
+        {
+          "method": "GET",
+          "summary": "Get this user's current state.",
+          "notes": "Get this user's current state.",
+          "type": "InitialSyncResponse",
+          "nickname": "initial_sync",
+          "parameters": [
+            {
+              "name": "limit",
+              "description": "The maximum number of messages to return for each room.",
+              "type": "integer",
+              "paramType": "query",
+              "required": false
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "path": "/publicRooms",
+      "operations": [
+        {
+          "method": "GET",
+          "summary": "Get a list of publicly visible rooms.",
+          "type": "PublicRoomsPaginationChunk",
+          "nickname": "get_public_room_list"
+        }
+      ]
     }
   ],
   "models": {
@@ -107,6 +139,108 @@
           "required": true
         }
       }
+    },
+    "PublicRoomInfo": {
+      "id": "PublicRoomInfo",
+      "properties": {
+        "aliases": {
+          "type": "array",
+          "description": "A list of room aliases for this room.",
+          "items": {
+            "$ref": "string"
+          }
+        },
+        "name": {
+          "type": "string",
+          "description": "The name of the room, as given by the m.room.name state event."
+        },
+        "room_id": {
+          "type": "string",
+          "description": "The room ID for this public room.",
+          "required": true
+        },
+        "topic": {
+          "type": "string",
+          "description": "The topic of this room, as given by the m.room.topic state event."
+        }
+      }
+    },
+    "PublicRoomsPaginationChunk": {
+      "id": "PublicRoomsPaginationChunk",
+      "properties": {
+        "start": {
+          "type": "string",
+          "description": "A token which correlates to the first value in \"chunk\" for paginating.",
+          "required": true
+        },
+        "end": {
+          "type": "string",
+          "description": "A token which correlates to the last value in \"chunk\" for paginating.",
+          "required": true
+        },
+        "chunk": {
+          "type": "array",
+          "description": "A list of public room data.",
+          "required": true,
+          "items": {
+            "$ref": "PublicRoomInfo"
+          }
+        }
+      }
+    },
+    "InitialSyncResponse": {
+      "id": "InitialSyncResponse",
+      "properties": {
+        "end": {
+          "type": "string",
+          "description": "A streaming token which can be used with /events to continue from this snapshot of data.",
+          "required": true
+        },
+        "presence": {
+          "type": "array",
+          "description": "A list of presence events.",
+          "items": {
+            "$ref": "Event"
+          },
+          "required": false
+        },
+        "rooms": {
+          "type": "array",
+          "description": "A list of initial sync room data.",
+          "required": false,
+          "items": {
+            "$ref": "InitialSyncRoomData"
+          }
+        }
+      }
+    },
+    "InitialSyncRoomData": {
+      "id": "InitialSyncRoomData",
+      "properties": {
+        "membership": {
+          "type": "string",
+          "description": "This user's membership state in this room.",
+          "required": true
+        },
+        "room_id": {
+          "type": "string",
+          "description": "The ID of this room.",
+          "required": true
+        },
+        "messages": {
+          "type": "PaginationChunk",
+          "description": "The most recent messages for this room, governed by the limit parameter.",
+          "required": false
+        },
+        "state": {
+          "type": "array",
+          "description": "A list of state events representing the current state of the room.",
+          "required": false,
+          "items": {
+            "$ref": "Event"
+          }
+        }
+      }
     }
   }
 }