267 lines
5.9 KiB
JSON
267 lines
5.9 KiB
JSON
{
|
|
"Title": "Messages",
|
|
"Interface": "Message",
|
|
"Struct": null,
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "channelID",
|
|
"required": true,
|
|
"title": "Channel ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
},
|
|
"Protocol": "",
|
|
"Authentication": [
|
|
"Client ID",
|
|
"Session ID"
|
|
],
|
|
"Path": "/channels/{channelID}/messages",
|
|
"APIs": [
|
|
{
|
|
"Name": "create",
|
|
"Method": "POST",
|
|
"Title": "Post new message to the channel",
|
|
"Path": "/",
|
|
"Parameters": {
|
|
"post": [
|
|
{
|
|
"name": "message",
|
|
"required": true,
|
|
"sensitive": true,
|
|
"title": "Message contents (markdown)",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "executeCommand",
|
|
"Method": "POST",
|
|
"Title": "Execute command",
|
|
"Path": "/command/{command}/exec",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "command",
|
|
"required": true,
|
|
"title": "Command to be executed",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"name": "input",
|
|
"required": false,
|
|
"title": "Arbitrary command input",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "params",
|
|
"required": false,
|
|
"title": "Command parameters",
|
|
"type": "[]string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "markAsRead",
|
|
"Method": "GET",
|
|
"Title": "Manages read/unread messages in a channel or a thread",
|
|
"Path": "/mark-as-read",
|
|
"Parameters": {
|
|
"get": [
|
|
{
|
|
"name": "threadID",
|
|
"required": false,
|
|
"title": "ID of thread (messageID) ",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"name": "lastReadMessageID",
|
|
"required": false,
|
|
"title": "ID of the last read message",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"path": []
|
|
}
|
|
},
|
|
{
|
|
"Name": "edit",
|
|
"Method": "PUT",
|
|
"Title": "Edit existing message",
|
|
"Path": "/{messageID}",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"name": "message",
|
|
"required": true,
|
|
"sensitive": true,
|
|
"title": "Message contents (markdown)",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "delete",
|
|
"Method": "DELETE",
|
|
"Title": "Delete existing message",
|
|
"Path": "/{messageID}",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "replyCreate",
|
|
"Method": "POST",
|
|
"Title": "Reply to a message",
|
|
"Path": "/{messageID}/replies",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"name": "message",
|
|
"required": true,
|
|
"sensitive": true,
|
|
"title": "Message contents (markdown)",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "pinCreate",
|
|
"Method": "POST",
|
|
"Title": "Pin message to channel (public bookmark)",
|
|
"Path": "/{messageID}/pin",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "pinRemove",
|
|
"Method": "DELETE",
|
|
"Title": "Pin message to channel (public bookmark)",
|
|
"Path": "/{messageID}/pin",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "bookmarkCreate",
|
|
"Method": "POST",
|
|
"Title": "Bookmark a message (private bookmark)",
|
|
"Path": "/{messageID}/bookmark",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "bookmarkRemove",
|
|
"Method": "DELETE",
|
|
"Title": "Remove boomark from message (private bookmark)",
|
|
"Path": "/{messageID}/bookmark",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "reactionCreate",
|
|
"Method": "POST",
|
|
"Title": "React to a message",
|
|
"Path": "/{messageID}/reaction/{reaction}",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"name": "reaction",
|
|
"required": true,
|
|
"title": "Reaction",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "reactionRemove",
|
|
"Method": "DELETE",
|
|
"Title": "Delete reaction from a message",
|
|
"Path": "/{messageID}/reaction/{reaction}",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
},
|
|
{
|
|
"name": "reaction",
|
|
"required": true,
|
|
"title": "Reaction",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |