2014-08-22 06:40:37 -06:00
|
|
|
{
|
|
|
|
"apiVersion": "1.0.0",
|
|
|
|
"swaggerVersion": "1.2",
|
2014-09-03 03:47:00 -06:00
|
|
|
"basePath": "http://localhost:8008/_matrix/client/api/v1",
|
2014-08-27 05:14:26 -06:00
|
|
|
"resourcePath": "/events",
|
2014-08-22 06:40:37 -06:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"apis": [
|
|
|
|
{
|
2014-08-27 05:14:26 -06:00
|
|
|
"path": "/events",
|
2014-08-22 06:40:37 -06:00
|
|
|
"operations": [
|
|
|
|
{
|
|
|
|
"method": "GET",
|
2014-08-27 05:14:26 -06:00
|
|
|
"summary": "Listen on the event stream",
|
|
|
|
"notes": "This can only be done by the logged in user. This will block until an event is received, or until the timeout is reached.",
|
|
|
|
"type": "PaginationChunk",
|
2014-09-02 05:09:47 -06:00
|
|
|
"nickname": "get_event_stream",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "from",
|
|
|
|
"description": "The token to stream from.",
|
|
|
|
"required": false,
|
|
|
|
"type": "string",
|
|
|
|
"paramType": "query"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "timeout",
|
|
|
|
"description": "The maximum time in milliseconds to wait for an event.",
|
|
|
|
"required": false,
|
|
|
|
"type": "integer",
|
|
|
|
"paramType": "query"
|
|
|
|
}
|
|
|
|
]
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
2014-08-27 05:14:26 -06:00
|
|
|
],
|
2014-09-02 05:09:47 -06:00
|
|
|
|
2014-08-27 05:14:26 -06:00
|
|
|
"responseMessages": [
|
2014-08-22 06:40:37 -06:00
|
|
|
{
|
2014-08-27 05:14:26 -06:00
|
|
|
"code": 400,
|
|
|
|
"message": "Bad pagination token."
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2014-08-27 05:14:26 -06:00
|
|
|
"path": "/events/{eventId}",
|
2014-08-22 06:40:37 -06:00
|
|
|
"operations": [
|
|
|
|
{
|
|
|
|
"method": "GET",
|
2014-08-27 05:14:26 -06:00
|
|
|
"summary": "Get information about a single event.",
|
|
|
|
"notes": "Get information about a single event.",
|
|
|
|
"type": "Event",
|
|
|
|
"nickname": "get_event",
|
2014-08-22 06:40:37 -06:00
|
|
|
"parameters": [
|
|
|
|
{
|
2014-08-27 05:14:26 -06:00
|
|
|
"name": "eventId",
|
|
|
|
"description": "The event ID to get.",
|
2014-08-22 06:40:37 -06:00
|
|
|
"required": true,
|
|
|
|
"type": "string",
|
|
|
|
"paramType": "path"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responseMessages": [
|
|
|
|
{
|
|
|
|
"code": 404,
|
2014-08-27 05:14:26 -06:00
|
|
|
"message": "Event not found."
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2014-08-27 08:41:19 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
]
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"models": {
|
2014-08-27 05:14:26 -06:00
|
|
|
"PaginationChunk": {
|
|
|
|
"id": "PaginationChunk",
|
2014-08-22 06:40:37 -06:00
|
|
|
"properties": {
|
2014-08-27 05:14:26 -06:00
|
|
|
"start": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "A token which correlates to the first value in \"chunk\" for paginating.",
|
|
|
|
"required": true
|
2014-08-22 06:40:37 -06:00
|
|
|
},
|
2014-08-27 05:14:26 -06:00
|
|
|
"end": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "A token which correlates to the last value in \"chunk\" for paginating.",
|
|
|
|
"required": true
|
2014-08-22 06:40:37 -06:00
|
|
|
},
|
2014-08-27 05:14:26 -06:00
|
|
|
"chunk": {
|
|
|
|
"type": "array",
|
|
|
|
"description": "An array of events.",
|
|
|
|
"required": true,
|
|
|
|
"items": {
|
|
|
|
"$ref": "Event"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"Event": {
|
|
|
|
"id": "Event",
|
|
|
|
"properties": {
|
|
|
|
"event_id": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "An ID which uniquely identifies this event.",
|
|
|
|
"required": true
|
2014-08-22 06:40:37 -06:00
|
|
|
},
|
2014-08-27 05:14:26 -06:00
|
|
|
"room_id": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "The room in which this event occurred.",
|
|
|
|
"required": true
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
}
|
2014-08-27 08:41:19 -06:00
|
|
|
},
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
}
|
2014-08-27 05:14:26 -06:00
|
|
|
}
|