Added generic state/non-state event sending to the API docs.
parent
abe2035d85
commit
e179ed1f60
|
@ -13,14 +13,104 @@
|
||||||
"token": []
|
"token": []
|
||||||
},
|
},
|
||||||
"apis": [
|
"apis": [
|
||||||
|
{
|
||||||
|
"path": "/rooms/{roomId}/send/{eventType}/{txnId}",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"method": "PUT",
|
||||||
|
"summary": "Send a generic non-state event to this room.",
|
||||||
|
"notes": "This operation can also be done as a POST to /rooms/{roomId}/send/{eventType}",
|
||||||
|
"type": "EventId",
|
||||||
|
"nickname": "send_non_state_event",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "body",
|
||||||
|
"description": "The event contents",
|
||||||
|
"required": true,
|
||||||
|
"type": "EventContent",
|
||||||
|
"paramType": "body"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "roomId",
|
||||||
|
"description": "The room to send the message in.",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"paramType": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "eventType",
|
||||||
|
"description": "The type of event to send.",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"paramType": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "txnId",
|
||||||
|
"description": "A client transaction ID to ensure idempotency. This can only be omitted if the HTTP method becomes a POST.",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"paramType": "path"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/rooms/{roomId}/state/{eventType}/{stateKey}",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"method": "PUT",
|
||||||
|
"summary": "Send a generic state event to this room.",
|
||||||
|
"notes": "The state key can be omitted, such that you can PUT to /rooms/{roomId}/state/{eventType}. The state key defaults to a 0 length string in this case.",
|
||||||
|
"type": "void",
|
||||||
|
"nickname": "send_state_event",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "body",
|
||||||
|
"description": "The event contents",
|
||||||
|
"required": true,
|
||||||
|
"type": "EventContent",
|
||||||
|
"paramType": "body"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "roomId",
|
||||||
|
"description": "The room to send the message in.",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"paramType": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "eventType",
|
||||||
|
"description": "The type of event to send.",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"paramType": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "stateKey",
|
||||||
|
"description": "An identifier used to specify clobbering semantics. State events with the same (roomId, eventType, stateKey) will be replaced.",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"paramType": "path"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "/rooms/{roomId}/send/m.room.message/{txnId}",
|
"path": "/rooms/{roomId}/send/m.room.message/{txnId}",
|
||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"summary": "Send a message in this room.",
|
"summary": "Send a message in this room.",
|
||||||
"notes": "Send a message in this room.",
|
"notes": "This operation can also be done as a POST to /rooms/{roomId}/send/m.room.message",
|
||||||
"type": "void",
|
"type": "EventId",
|
||||||
"nickname": "send_message",
|
"nickname": "send_message",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
@ -42,7 +132,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "txnId",
|
"name": "txnId",
|
||||||
"description": "A client transaction ID to ensure idempotency.",
|
"description": "A client transaction ID to ensure idempotency. This can only be omitted if the HTTP method becomes a POST.",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"paramType": "path"
|
"paramType": "path"
|
||||||
|
@ -110,8 +200,8 @@
|
||||||
{
|
{
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"summary": "Send feedback to a message.",
|
"summary": "Send feedback to a message.",
|
||||||
"notes": "Send feedback to a message.",
|
"notes": "This operation can also be done as a POST to /rooms/{roomId}/send/m.room.message.feedback",
|
||||||
"type": "void",
|
"type": "EventId",
|
||||||
"nickname": "send_feedback",
|
"nickname": "send_feedback",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
@ -133,7 +223,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "txnId",
|
"name": "txnId",
|
||||||
"description": "A client transaction ID to ensure idempotency.",
|
"description": "A client transaction ID to ensure idempotency. This can only be omitted if the HTTP method becomes a POST.",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"paramType": "path"
|
"paramType": "path"
|
||||||
|
@ -633,12 +723,17 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"event_id": {
|
"event_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "An ID which uniquely identifies this event.",
|
"description": "An ID which uniquely identifies this event. This is automatically set by the server.",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"room_id": {
|
"room_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The room in which this event occurred.",
|
"description": "The room in which this event occurred. This is automatically set by the server.",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The event type.",
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -646,6 +741,26 @@
|
||||||
"MessageEvent"
|
"MessageEvent"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"EventId": {
|
||||||
|
"id": "EventId",
|
||||||
|
"properties": {
|
||||||
|
"event_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The allocated event ID for this event.",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"EventContent": {
|
||||||
|
"id": "EventContent",
|
||||||
|
"properties": {
|
||||||
|
"__event_content_keys__": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Event-specific content keys and values.",
|
||||||
|
"required": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"MessageEvent": {
|
"MessageEvent": {
|
||||||
"id": "MessageEvent",
|
"id": "MessageEvent",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
Loading…
Reference in New Issue