Skip to content

Commit

Permalink
Updated from Slack docs, 2023/04/27
Browse files Browse the repository at this point in the history
  • Loading branch information
Slack API Ref Buildbot committed Apr 27, 2023
1 parent 18aad2f commit a29b520
Show file tree
Hide file tree
Showing 21 changed files with 34 additions and 33 deletions.
4 changes: 2 additions & 2 deletions events/channel_archive.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"required_scope": "RTM",
"example": {
"type": "channel_archive",
"channel": "C024BE91L",
"user": "U024BE7LH"
"channel": "C123ABC456",
"user": "U123ABC456"
}
}
2 changes: 1 addition & 1 deletion events/channel_deleted.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"required_scope": "RTM",
"example": {
"type": "channel_deleted",
"channel": "C024BE91L"
"channel": "C123ABC456"
}
}
2 changes: 1 addition & 1 deletion events/channel_left.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"required_scope": "RTM",
"example": {
"type": "channel_left",
"channel": "C024BE91L"
"channel": "C123ABC456"
}
}
2 changes: 1 addition & 1 deletion events/channel_marked.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"required_scope": "RTM",
"example": {
"type": "channel_marked",
"channel": "C024BE91L",
"channel": "C123ABC456",
"ts": "1401383885.000061"
}
}
4 changes: 2 additions & 2 deletions events/channel_unarchive.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"required_scope": "RTM",
"example": {
"type": "channel_unarchive",
"channel": "C024BE91L",
"user": "U024BE7LH"
"channel": "C123ABC456",
"user": "U123ABC456"
}
}
6 changes: 3 additions & 3 deletions events/member_joined_channel.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"required_scope": "RTM",
"example": {
"type": "member_joined_channel",
"user": "W06GH7XHN",
"channel": "C0698JE0H",
"user": "W123ABC456",
"channel": "C123ABC456",
"channel_type": "C",
"team": "T024BE7LD",
"team": "T123ABC456",
"inviter": "U123456789"
}
}
6 changes: 3 additions & 3 deletions events/message.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "message",
"desc": "A message was sent to a channel.",
"long_desc": "A message is delivered from several sources: A simple message is self explanatory: The channel property is the ID of the channel, private group or DM channel this message is posted in. The user property is the ID of the user speaking, the text property is the text spoken, and ts is the unique (per-channel) timestamp. Messages can also include an attachments property, containing a list of attachment objects. If the message has been edited after posting it will include an edited property, including the user ID of the editor, and the timestamp the edit happened. The original text of the message is not available. For example: Unlike other event types, message events can have a subtype. For example, this is a channel join message: They are structured in this way so that clients can either support them fully by having distinct behavior for each different subtype, or can fallback to a simple mode by just displaying the text of the message. The full list of message subtypes is: Some subtypes have a special hidden property. These indicate messages that are part of the history of a channel but should not be displayed to users. Examples include records of message edits or deletes: Hidden messages will not appear as the latest property on channel, group or im objects. They will also not return in calls to conversations.history. Messages can have several extra properties depending on whether or not they have been starred, pinned, or reacted to: The is_starred property is present and true if the calling user has starred the message, else it is omitted. The pinned_to array, if present, contains the IDs of any channels to which the message is currently pinned. The reactions property, if present, contains any reactions that have been added to the message and gives information about the type of reaction, the total number of users who added that reaction and a (possibly incomplete) list of users who have added that reaction to the message. The users array in the reactions property might not always contain all users that have reacted (we limit it to X users, and X might change), however count will always represent the count of all users who made that reaction (i.e. it may be greater than users.length). If the authenticated user has a given reaction then they are guaranteed to appear in the users array, regardless of whether count is greater than users.length or not. This exact event type is defined differently in the Events API. Depending on your associated OAuth scope or the channels your bot user belongs to, you must subscribe to one of the following events instead: The semantics for the events are the same as those described here — you're still receiving an event of type message. Not all message subtypes are deliverable in the Events API. When an event occurs, we will send an HTTP POST request to your Request URL. The outer payload is uniform across all Events API methods, and contains fields like team_id and event. Learn more",
"long_desc": "A message is delivered from several sources: A basic message: The channel property is the ID of the channel, private group or DM channel this message is posted in. The user property is the ID of the user speaking, the text property is the text spoken, and ts is the unique (per-channel) timestamp. Messages can also include an attachments property, containing a list of attachment objects. If the message has been edited after posting it will include an edited property, including the user ID of the editor, and the timestamp the edit happened. The original text of the message is not available. For example: Unlike other event types, message events can have a subtype. For example, this is a channel join message: They are structured in this way so that clients can either support them fully by having distinct behavior for each different subtype, or can fallback to a simple mode by just displaying the text of the message. The full list of message subtypes is: Some subtypes have a special hidden property. These indicate messages that are part of the history of a channel but should not be displayed to users. Examples include records of message edits or deletes: Hidden messages will not appear as the latest property on channel, group or im objects. They will also not return in calls to conversations.history. Messages can have several extra properties depending on whether or not they have been starred, pinned, or reacted to: The is_starred property is present and true if the calling user has starred the message, else it is omitted. The pinned_to array, if present, contains the IDs of any channels to which the message is currently pinned. The reactions property, if present, contains any reactions that have been added to the message and gives information about the type of reaction, the total number of users who added that reaction and a (possibly incomplete) list of users who have added that reaction to the message. The users array in the reactions property might not always contain all users that have reacted (we limit it to X users, and X might change), however count will always represent the count of all users who made that reaction (i.e. it may be greater than users.length). If the authenticated user has a given reaction then they are guaranteed to appear in the users array, regardless of whether count is greater than users.length or not. This exact event type is defined differently in the Events API. Depending on your associated OAuth scope or the channels your bot user belongs to, you must subscribe to one of the following events instead: The semantics for the events are the same as those described here — you're still receiving an event of type message. Not all message subtypes are deliverable in the Events API. When an event occurs, we will send an HTTP POST request to your Request URL. The outer payload is uniform across all Events API methods, and contains fields like team_id and event. Learn more",
"required_scope": "RTM",
"example": {
"type": "message",
"channel": "C2147483705",
"user": "U2147483697",
"channel": "C123ABC456",
"user": "U123ABC456",
"text": "Hello world",
"ts": "1355517523.000005"
}
Expand Down
6 changes: 3 additions & 3 deletions events/reaction_added.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"required_scope": "RTM",
"example": {
"type": "reaction_added",
"user": "U024BE7LH",
"user": "U123ABC456",
"reaction": "thumbsup",
"item_user": "U0G9QF9C6",
"item_user": "U222222222",
"item": {
"type": "message",
"channel": "C0G9QF9GZ",
"channel": "C123ABC456",
"ts": "1360782400.498405"
},
"event_ts": "1360782804.083113"
Expand Down
6 changes: 3 additions & 3 deletions events/reaction_removed.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"required_scope": "RTM",
"example": {
"type": "reaction_removed",
"user": "U024BE7LH",
"user": "U123ABC456",
"reaction": "thumbsup",
"item_user": "U0G9QF9C6",
"item_user": "U222222222",
"item": {
"type": "message",
"channel": "C0G9QF9GZ",
"channel": "C123ABC456",
"ts": "1360782400.498405"
},
"event_ts": "1360782804.083113"
Expand Down
4 changes: 2 additions & 2 deletions events/user_typing.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"required_scope": "RTM",
"example": {
"type": "user_typing",
"channel": "C02ELGNBH",
"user": "U024BE7LH"
"channel": "C123ABC456",
"user": "U123ABC456"
}
}
2 changes: 1 addition & 1 deletion methods/chat/chat.delete.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"response": {
"examples": [
"{\n \"ok\": true,\n \"channel\": \"C024BE91L\",\n \"ts\": \"1401383885.000061\"\n}",
"{\n \"ok\": true,\n \"channel\": \"C123ABC456\",\n \"ts\": \"1401383885.000061\"\n}",
"{\n \"error\": \"message_not_found\",\n \"ok\": false\n}"
]
},
Expand Down
4 changes: 2 additions & 2 deletions methods/chat/chat.getPermalink.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"response": {
"examples": [
"{\n \"ok\": true,\n \"channel\": \"C1H9RESGA\",\n \"permalink\": \"https://ghostbusters.slack.com/archives/C1H9RESGA/p135854651500008\"\n}",
"{\n \"ok\": true,\n \"channel\": \"C1H9RESGA\",\n \"permalink\": \"https://ghostbusters.slack.com/archives/C1H9RESGL/p135854651700023?thread_ts=1358546515.000008&cid=C1H9RESGL\"\n}",
"{\n \"ok\": true,\n \"channel\": \"C123ABC456\",\n \"permalink\": \"https://ghostbusters.slack.com/archives/C1H9RESGA/p135854651500008\"\n}",
"{\n \"ok\": true,\n \"channel\": \"C123ABC456\",\n \"permalink\": \"https://ghostbusters.slack.com/archives/C1H9RESGL/p135854651700023?thread_ts=1358546515.000008&cid=C1H9RESGL\"\n}",
"{\n \"ok\": false,\n \"error\": \"channel_not_found\"\n}"
]
},
Expand Down
2 changes: 1 addition & 1 deletion methods/chat/chat.meMessage.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"response": {
"examples": [
"{\n \"ok\": true,\n \"channel\": \"C024BE7LR\",\n \"ts\": \"1417671948.000006\"\n}",
"{\n \"ok\": true,\n \"channel\": \"C123ABC456\",\n \"ts\": \"1417671948.000006\"\n}",
"{\n \"ok\": false,\n \"error\": \"invalid_auth\"\n}"
]
},
Expand Down
2 changes: 1 addition & 1 deletion methods/chat/chat.postMessage.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
],
"response": {
"examples": [
"{\n \"ok\": true,\n \"channel\": \"C123456\",\n \"ts\": \"1503435956.000247\",\n \"message\": {\n \"text\": \"Here's a message for you\",\n \"username\": \"ecto1\",\n \"bot_id\": \"B123456\",\n \"attachments\": [\n {\n \"text\": \"This is an attachment\",\n \"id\": 1,\n \"fallback\": \"This is an attachment's fallback\"\n }\n ],\n \"type\": \"message\",\n \"subtype\": \"bot_message\",\n \"ts\": \"1503435956.000247\"\n }\n}",
"{\n \"ok\": true,\n \"channel\": \"C123ABC456\",\n \"ts\": \"1503435956.000247\",\n \"message\": {\n \"text\": \"Here's a message for you\",\n \"username\": \"ecto1\",\n \"bot_id\": \"B123ABC456\",\n \"attachments\": [\n {\n \"text\": \"This is an attachment\",\n \"id\": 1,\n \"fallback\": \"This is an attachment's fallback\"\n }\n ],\n \"type\": \"message\",\n \"subtype\": \"bot_message\",\n \"ts\": \"1503435956.000247\"\n }\n}",
"{\n \"ok\": false,\n \"error\": \"too_many_attachments\"\n}"
]
},
Expand Down
2 changes: 1 addition & 1 deletion methods/chat/chat.scheduleMessage.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
"response": {
"examples": [
"{\n \"ok\": true,\n \"channel\": \"C123456\",\n \"scheduled_message_id\": \"Q1298393284\",\n \"post_at\": \"1562180400\",\n \"message\": {\n \"text\": \"Here's a message for you in the future\",\n \"username\": \"ecto1\",\n \"bot_id\": \"B123456\",\n \"attachments\": [\n {\n \"text\": \"This is an attachment\",\n \"id\": 1,\n \"fallback\": \"This is an attachment's fallback\"\n }\n ],\n \"type\": \"delayed_message\",\n \"subtype\": \"bot_message\"\n }\n}",
"{\n \"ok\": true,\n \"channel\": \"C123ABC456\",\n \"scheduled_message_id\": \"Q1298393284\",\n \"post_at\": \"1562180400\",\n \"message\": {\n \"text\": \"Here's a message for you in the future\",\n \"username\": \"ecto1\",\n \"bot_id\": \"B123ABC456\",\n \"attachments\": [\n {\n \"text\": \"This is an attachment\",\n \"id\": 1,\n \"fallback\": \"This is an attachment's fallback\"\n }\n ],\n \"type\": \"delayed_message\",\n \"subtype\": \"bot_message\"\n }\n}",
"{\n \"ok\": false,\n \"error\": \"time_in_past\"\n}"
]
},
Expand Down
2 changes: 1 addition & 1 deletion methods/chat/chat.update.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"response": {
"examples": [
"{\n \"ok\": true,\n \"channel\": \"C024BE91L\",\n \"ts\": \"1401383885.000061\",\n \"text\": \"Updated text you carefully authored\",\n \"message\": {\n \"text\": \"Updated text you carefully authored\",\n \"user\": \"U34567890\"\n }\n}",
"{\n \"ok\": true,\n \"channel\": \"C123ABC456\",\n \"ts\": \"1401383885.000061\",\n \"text\": \"Updated text you carefully authored\",\n \"message\": {\n \"text\": \"Updated text you carefully authored\",\n \"user\": \"U34567890\"\n }\n}",
"{\n \"ok\": false,\n \"error\": \"cant_update_message\"\n}"
]
},
Expand Down
2 changes: 1 addition & 1 deletion methods/pins/pins.list.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"response": {
"examples": [
"{\n \"items\": [\n {\n \"channel\": \"C2U86NC6H\",\n \"created\": 1508881078,\n \"created_by\": \"U2U85N1RZ\",\n \"message\": {\n \"permalink\": \"https://hitchhikers.slack.com/archives/C2U86NC6H/p1508197641000151\",\n \"pinned_to\": [\n \"C2U86NC6H\"\n ],\n \"text\": \"What is the meaning of life?\",\n \"ts\": \"1508197641.000151\",\n \"type\": \"message\",\n \"user\": \"U2U85N1RZ\"\n },\n \"type\": \"message\"\n },\n {\n \"channel\": \"C2U86NC6H\",\n \"created\": 1508880991,\n \"created_by\": \"U2U85N1RZ\",\n \"message\": {\n \"permalink\": \"https://hitchhikers.slack.com/archives/C2U86NC6H/p1508284197000015\",\n \"pinned_to\": [\n \"C2U86NC6H\"\n ],\n \"text\": \"The meaning of life, the universe, and everything is 42.\",\n \"ts\": \"1503289197.000015\",\n \"type\": \"message\",\n \"user\": \"U2U85N1RZ\"\n },\n \"type\": \"message\"\n }\n ],\n \"ok\": true\n}",
"{\n \"items\": [\n {\n \"channel\": \"C123ABC456\",\n \"created\": 1508881078,\n \"created_by\": \"U123ABC456\",\n \"message\": {\n \"permalink\": \"https://hitchhikers.slack.com/archives/C2U86NC6H/p1508197641000151\",\n \"pinned_to\": [\n \"C2U86NC6H\"\n ],\n \"text\": \"What is the meaning of life?\",\n \"ts\": \"1508197641.000151\",\n \"type\": \"message\",\n \"user\": \"U123ABC456\"\n },\n \"type\": \"message\"\n },\n {\n \"channel\": \"C123ABC456\",\n \"created\": 1508880991,\n \"created_by\": \"U123ABC456\",\n \"message\": {\n \"permalink\": \"https://hitchhikers.slack.com/archives/C2U86NC6H/p1508284197000015\",\n \"pinned_to\": [\n \"C123ABC456\"\n ],\n \"text\": \"The meaning of life, the universe, and everything is 42.\",\n \"ts\": \"1503289197.000015\",\n \"type\": \"message\",\n \"user\": \"U123ABC456\"\n },\n \"type\": \"message\"\n }\n ],\n \"ok\": true\n}",
"{\n \"ok\": false,\n \"error\": \"invalid_auth\"\n}"
]
},
Expand Down
2 changes: 1 addition & 1 deletion methods/reactions/reactions.get.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"response": {
"examples": [
"{\n \"ok\": true,\n \"type\": \"message\",\n \"message\": {\n \"type\": \"message\",\n \"text\": \"Hi there!\",\n \"user\": \"W123456\",\n \"ts\": \"1648602352.215969\",\n \"team\": \"T123456\",\n \"reactions\": [\n {\n \"name\": \"grinning\",\n \"users\": [\n \"W222222\"\n ],\n \"count\": 1\n },\n {\n \"name\": \"question\",\n \"users\": [\n \"W333333\"\n ],\n \"count\": 1\n }\n ],\n \"permalink\": \"https://xxx.slack.com/archives/C123456/p1648602352215969\"\n },\n \"channel\": \"C123456\"\n}",
"{\n \"ok\": true,\n \"type\": \"message\",\n \"message\": {\n \"type\": \"message\",\n \"text\": \"Hi there!\",\n \"user\": \"W123456\",\n \"ts\": \"1648602352.215969\",\n \"team\": \"T123456\",\n \"reactions\": [\n {\n \"name\": \"grinning\",\n \"users\": [\n \"W222222\"\n ],\n \"count\": 1\n },\n {\n \"name\": \"question\",\n \"users\": [\n \"W333333\"\n ],\n \"count\": 1\n }\n ],\n \"permalink\": \"https://xxx.slack.com/archives/C123456/p1648602352215969\"\n },\n \"channel\": \"C123ABC456\"\n}",
"{\n \"ok\": false,\n \"error\": \"invalid_auth\"\n}"
]
},
Expand Down
Loading

0 comments on commit a29b520

Please sign in to comment.