3
0
corteza/docs/src/message.json
2018-06-03 14:27:37 +02:00

122 lines
2.7 KiB
JSON

{
"Title": "Messages",
"Package": "crust",
"Interface": "Message",
"Path": "/message",
"APIs": {
"edit": {
"Method": "POST",
"Title": "New message / edit message",
"Path": "/edit",
"Parameters": {
"post": [
{
"name": "id",
"required": false,
"title": "ID of Message",
"type": "uint64"
},
{
"name": "channel_id",
"required": false,
"title": "ID of Channel where to post message",
"type": "uint64"
},
{
"name": "contents",
"required": true,
"title": "Message contents (markdown)",
"type": "string"
}
]
}
},
"flag": {
"Method": "POST",
"Title": "Flag message for user (bookmark)",
"Path": "/flag",
"Parameters": {
"post": [
{
"name": "id",
"required": true,
"title": "ID of Message",
"type": "uint64"
}
]
}
},
"pin": {
"Method": "POST",
"Title": "Pin message to channel (public bookmark)",
"Path": "/pin",
"Parameters": {
"post": [
{
"name": "id",
"required": true,
"title": "ID of Message",
"type": "uint64"
}
]
}
},
"read": {
"Method": "GET",
"Title": "Read message details",
"Path": "/read",
"Parameters": {
"post": [
{
"name": "channel_id",
"required": true,
"title": "ID of Channel to read messages from",
"type": "uint64"
}
]
}
},
"remove": {
"Method": "DELETE",
"Title": "Remove message",
"Path": "/remove",
"Parameters": {
"get": [
{
"name": "id",
"required": true,
"title": "ID of Message",
"type": "uint64"
}
]
}
},
"search": {
"Method": "GET",
"Title": "Search messages",
"Path": "/search",
"Parameters": {
"get": [
{
"name": "query",
"required": false,
"title": "Search string to match against messages",
"type": "string"
},
{
"name": "message_type",
"required": false,
"title": "Limit results to message type",
"type": "string",
"values": [
"history",
"message",
"attachment",
"media"
]
}
]
}
}
}
}