260 lines
5.6 KiB
JSON
260 lines
5.6 KiB
JSON
{
|
|
"Title": "Messages",
|
|
"Package": "sam",
|
|
"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,
|
|
"title": "Message contents (markdown)",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "history",
|
|
"Method": "GET",
|
|
"Title": "All messages (channel history)",
|
|
"Path": "/",
|
|
"Parameters": {
|
|
"get": [
|
|
{
|
|
"name": "lastMessageID",
|
|
"required": false,
|
|
"title": "",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"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,
|
|
"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": "replyGet",
|
|
"Method": "GET",
|
|
"Title": "Returns all replies to a message",
|
|
"Path": "/{messageID}/replies",
|
|
"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,
|
|
"title": "Message contents (markdown)",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "markAsUnread",
|
|
"Method": "POST",
|
|
"Title": "Mark message in channel (or thread) as unread",
|
|
"Path": "/{messageID}/unread",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "messageID",
|
|
"required": true,
|
|
"title": "Message ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |