slack-ruby-client 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +0 -0
  3. data/.github/FUNDING.yml +0 -0
  4. data/.github/dependabot.yml +0 -0
  5. data/.github/workflows/danger-comment.yml +11 -0
  6. data/.github/workflows/danger.yml +13 -0
  7. data/.github/workflows/lint.yml +1 -1
  8. data/.github/workflows/test.yml +1 -1
  9. data/.github/workflows/update_api.yml +8 -10
  10. data/.gitignore +0 -0
  11. data/.gitmodules +0 -0
  12. data/.rspec +0 -0
  13. data/.rubocop.yml +0 -0
  14. data/.rubocop_todo.yml +5 -2
  15. data/.ruby-version +0 -0
  16. data/CHANGELOG.md +14 -0
  17. data/CONTRIBUTING.md +0 -0
  18. data/Dangerfile +4 -1
  19. data/Gemfile +3 -0
  20. data/LICENSE.md +0 -0
  21. data/README.md +1 -1
  22. data/RELEASING.md +0 -0
  23. data/Rakefile +0 -0
  24. data/SECURITY.md +0 -0
  25. data/UPGRADING.md +4 -0
  26. data/bin/commands/admin_analytics.rb +0 -0
  27. data/bin/commands/admin_analytics_messages.rb +36 -0
  28. data/bin/commands/admin_apps.rb +3 -0
  29. data/bin/commands/admin_apps_activities.rb +0 -0
  30. data/bin/commands/admin_apps_approved.rb +0 -0
  31. data/bin/commands/admin_apps_config.rb +0 -0
  32. data/bin/commands/admin_apps_requests.rb +0 -0
  33. data/bin/commands/admin_apps_restricted.rb +0 -0
  34. data/bin/commands/admin_audit_anomaly_allow.rb +0 -0
  35. data/bin/commands/admin_auth_policy.rb +0 -0
  36. data/bin/commands/admin_barriers.rb +0 -0
  37. data/bin/commands/admin_conversations.rb +10 -0
  38. data/bin/commands/admin_conversations_ekm.rb +0 -0
  39. data/bin/commands/admin_conversations_restrictAccess.rb +0 -0
  40. data/bin/commands/admin_emoji.rb +0 -0
  41. data/bin/commands/admin_functions.rb +3 -2
  42. data/bin/commands/admin_functions_permissions.rb +3 -2
  43. data/bin/commands/admin_inviteRequests.rb +0 -0
  44. data/bin/commands/admin_inviteRequests_approved.rb +0 -0
  45. data/bin/commands/admin_inviteRequests_denied.rb +0 -0
  46. data/bin/commands/admin_roles.rb +0 -0
  47. data/bin/commands/admin_teams.rb +0 -0
  48. data/bin/commands/admin_teams_admins.rb +0 -0
  49. data/bin/commands/admin_teams_owners.rb +0 -0
  50. data/bin/commands/admin_teams_settings.rb +0 -0
  51. data/bin/commands/admin_usergroups.rb +0 -0
  52. data/bin/commands/admin_users.rb +20 -8
  53. data/bin/commands/admin_users_session.rb +0 -0
  54. data/bin/commands/admin_users_unsupportedVersions.rb +0 -0
  55. data/bin/commands/admin_workflows.rb +0 -0
  56. data/bin/commands/admin_workflows_collaborators.rb +0 -0
  57. data/bin/commands/admin_workflows_permissions.rb +0 -0
  58. data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -3
  59. data/bin/commands/api.rb +0 -0
  60. data/bin/commands/apps.rb +0 -0
  61. data/bin/commands/apps_activities.rb +0 -0
  62. data/bin/commands/apps_auth_external.rb +0 -0
  63. data/bin/commands/apps_connections.rb +0 -0
  64. data/bin/commands/apps_datastore.rb +0 -0
  65. data/bin/commands/apps_event_authorizations.rb +0 -0
  66. data/bin/commands/apps_icon.rb +22 -0
  67. data/bin/commands/apps_manifest.rb +7 -6
  68. data/bin/commands/apps_user_connection.rb +21 -0
  69. data/bin/commands/assistant_search.rb +9 -5
  70. data/bin/commands/assistant_threads.rb +5 -1
  71. data/bin/commands/auth.rb +0 -0
  72. data/bin/commands/auth_teams.rb +0 -0
  73. data/bin/commands/blocks.rb +22 -0
  74. data/bin/commands/bookmarks.rb +6 -6
  75. data/bin/commands/bots.rb +0 -0
  76. data/bin/commands/calls.rb +0 -0
  77. data/bin/commands/calls_participants.rb +0 -0
  78. data/bin/commands/canvases.rb +0 -0
  79. data/bin/commands/canvases_access.rb +0 -0
  80. data/bin/commands/canvases_sections.rb +0 -0
  81. data/bin/commands/chat.rb +50 -4
  82. data/bin/commands/chat_scheduledMessages.rb +0 -0
  83. data/bin/commands/conversations.rb +1 -1
  84. data/bin/commands/conversations_canvases.rb +0 -0
  85. data/bin/commands/conversations_externalInvitePermissions.rb +0 -0
  86. data/bin/commands/conversations_requestSharedInvite.rb +0 -0
  87. data/bin/commands/dialog.rb +0 -0
  88. data/bin/commands/dnd.rb +0 -0
  89. data/bin/commands/emoji.rb +0 -0
  90. data/bin/commands/entity.rb +24 -0
  91. data/bin/commands/files.rb +3 -3
  92. data/bin/commands/files_comments.rb +0 -0
  93. data/bin/commands/files_remote.rb +0 -0
  94. data/bin/commands/functions.rb +0 -0
  95. data/bin/commands/functions_distributions_permissions.rb +0 -0
  96. data/bin/commands/functions_workflows_steps.rb +0 -0
  97. data/bin/commands/functions_workflows_steps_responses.rb +0 -0
  98. data/bin/commands/migration.rb +0 -0
  99. data/bin/commands/oauth.rb +0 -0
  100. data/bin/commands/oauth_v2.rb +2 -0
  101. data/bin/commands/oauth_v2_user.rb +27 -0
  102. data/bin/commands/openid_connect.rb +1 -0
  103. data/bin/commands/pins.rb +0 -0
  104. data/bin/commands/reactions.rb +0 -0
  105. data/bin/commands/reminders.rb +0 -0
  106. data/bin/commands/rtm.rb +0 -0
  107. data/bin/commands/search.rb +0 -0
  108. data/bin/commands/slackLists.rb +0 -0
  109. data/bin/commands/slackLists_access.rb +0 -0
  110. data/bin/commands/slackLists_download.rb +0 -0
  111. data/bin/commands/slackLists_items.rb +0 -0
  112. data/bin/commands/stars.rb +0 -0
  113. data/bin/commands/team.rb +0 -0
  114. data/bin/commands/team_billing.rb +0 -0
  115. data/bin/commands/team_externalTeams.rb +0 -0
  116. data/bin/commands/team_preferences.rb +0 -0
  117. data/bin/commands/team_profile.rb +0 -0
  118. data/bin/commands/tooling_tokens.rb +0 -0
  119. data/bin/commands/usergroups.rb +0 -0
  120. data/bin/commands/usergroups_users.rb +0 -0
  121. data/bin/commands/users.rb +2 -2
  122. data/bin/commands/users_admin.rb +0 -0
  123. data/bin/commands/users_discoverableContacts.rb +0 -0
  124. data/bin/commands/users_prefs.rb +0 -0
  125. data/bin/commands/users_profile.rb +0 -0
  126. data/bin/commands/views.rb +1 -0
  127. data/bin/commands/workflows_featured.rb +0 -0
  128. data/bin/commands/workflows_triggers_permissions.rb +0 -0
  129. data/examples/files_upload_v2/.env.example +0 -0
  130. data/examples/files_upload_v2/Gemfile +0 -0
  131. data/examples/files_upload_v2/README.md +0 -0
  132. data/examples/files_upload_v2/files_upload_v2.rb +0 -0
  133. data/examples/hi_web/Gemfile +0 -0
  134. data/examples/hi_web/hi.gif +0 -0
  135. data/examples/hi_web/hi.rb +0 -0
  136. data/examples/new_ticket/Gemfile +0 -0
  137. data/examples/new_ticket/new_ticket.rb +0 -0
  138. data/examples/oauth_v2/.env.example +0 -0
  139. data/examples/oauth_v2/Gemfile +0 -0
  140. data/examples/oauth_v2/README.md +3 -3
  141. data/lib/slack/config.rb +0 -0
  142. data/lib/slack/events/config.rb +0 -0
  143. data/lib/slack/events/request.rb +0 -0
  144. data/lib/slack/logger.rb +0 -0
  145. data/lib/slack/messages/formatting.rb +0 -0
  146. data/lib/slack/messages/message.rb +0 -0
  147. data/lib/slack/utils/security.rb +0 -0
  148. data/lib/slack/version.rb +1 -1
  149. data/lib/slack/web/api/endpoints/admin_analytics.rb +0 -0
  150. data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +64 -0
  151. data/lib/slack/web/api/endpoints/admin_apps.rb +6 -0
  152. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +0 -0
  153. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +0 -0
  154. data/lib/slack/web/api/endpoints/admin_apps_config.rb +0 -0
  155. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +0 -0
  156. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +0 -0
  157. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +0 -0
  158. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +0 -0
  159. data/lib/slack/web/api/endpoints/admin_barriers.rb +0 -0
  160. data/lib/slack/web/api/endpoints/admin_conversations.rb +15 -0
  161. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +0 -0
  162. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +0 -0
  163. data/lib/slack/web/api/endpoints/admin_emoji.rb +0 -0
  164. data/lib/slack/web/api/endpoints/admin_functions.rb +3 -1
  165. data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +3 -2
  166. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +0 -0
  167. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +0 -0
  168. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +0 -0
  169. data/lib/slack/web/api/endpoints/admin_roles.rb +0 -0
  170. data/lib/slack/web/api/endpoints/admin_teams.rb +0 -0
  171. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +0 -0
  172. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +0 -0
  173. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +0 -0
  174. data/lib/slack/web/api/endpoints/admin_usergroups.rb +0 -0
  175. data/lib/slack/web/api/endpoints/admin_users.rb +23 -6
  176. data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -0
  177. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +0 -0
  178. data/lib/slack/web/api/endpoints/admin_workflows.rb +0 -0
  179. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +0 -0
  180. data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +0 -0
  181. data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +3 -3
  182. data/lib/slack/web/api/endpoints/api.rb +0 -0
  183. data/lib/slack/web/api/endpoints/apps.rb +0 -0
  184. data/lib/slack/web/api/endpoints/apps_activities.rb +0 -0
  185. data/lib/slack/web/api/endpoints/apps_auth_external.rb +0 -0
  186. data/lib/slack/web/api/endpoints/apps_connections.rb +0 -0
  187. data/lib/slack/web/api/endpoints/apps_datastore.rb +0 -0
  188. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -0
  189. data/lib/slack/web/api/endpoints/apps_icon.rb +28 -0
  190. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -3
  191. data/lib/slack/web/api/endpoints/apps_user_connection.rb +27 -0
  192. data/lib/slack/web/api/endpoints/assistant_search.rb +12 -4
  193. data/lib/slack/web/api/endpoints/assistant_threads.rb +10 -3
  194. data/lib/slack/web/api/endpoints/auth.rb +0 -0
  195. data/lib/slack/web/api/endpoints/auth_teams.rb +0 -0
  196. data/lib/slack/web/api/endpoints/blocks.rb +28 -0
  197. data/lib/slack/web/api/endpoints/bookmarks.rb +6 -12
  198. data/lib/slack/web/api/endpoints/bots.rb +0 -0
  199. data/lib/slack/web/api/endpoints/calls.rb +0 -0
  200. data/lib/slack/web/api/endpoints/calls_participants.rb +0 -0
  201. data/lib/slack/web/api/endpoints/canvases.rb +0 -0
  202. data/lib/slack/web/api/endpoints/canvases_access.rb +0 -0
  203. data/lib/slack/web/api/endpoints/canvases_sections.rb +0 -0
  204. data/lib/slack/web/api/endpoints/chat.rb +95 -12
  205. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +0 -0
  206. data/lib/slack/web/api/endpoints/conversations.rb +1 -1
  207. data/lib/slack/web/api/endpoints/conversations_canvases.rb +0 -0
  208. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +0 -0
  209. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +0 -0
  210. data/lib/slack/web/api/endpoints/dialog.rb +0 -0
  211. data/lib/slack/web/api/endpoints/dnd.rb +0 -0
  212. data/lib/slack/web/api/endpoints/emoji.rb +0 -0
  213. data/lib/slack/web/api/endpoints/entity.rb +32 -0
  214. data/lib/slack/web/api/endpoints/files.rb +2 -2
  215. data/lib/slack/web/api/endpoints/files_comments.rb +0 -0
  216. data/lib/slack/web/api/endpoints/files_remote.rb +0 -0
  217. data/lib/slack/web/api/endpoints/functions.rb +0 -0
  218. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +0 -0
  219. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +0 -0
  220. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +0 -0
  221. data/lib/slack/web/api/endpoints/migration.rb +0 -0
  222. data/lib/slack/web/api/endpoints/oauth.rb +0 -0
  223. data/lib/slack/web/api/endpoints/oauth_v2.rb +4 -0
  224. data/lib/slack/web/api/endpoints/oauth_v2_user.rb +37 -0
  225. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -0
  226. data/lib/slack/web/api/endpoints/pins.rb +0 -0
  227. data/lib/slack/web/api/endpoints/reactions.rb +0 -0
  228. data/lib/slack/web/api/endpoints/reminders.rb +0 -0
  229. data/lib/slack/web/api/endpoints/rtm.rb +0 -0
  230. data/lib/slack/web/api/endpoints/search.rb +0 -0
  231. data/lib/slack/web/api/endpoints/slackLists.rb +0 -0
  232. data/lib/slack/web/api/endpoints/slackLists_access.rb +0 -0
  233. data/lib/slack/web/api/endpoints/slackLists_download.rb +0 -0
  234. data/lib/slack/web/api/endpoints/slackLists_items.rb +0 -0
  235. data/lib/slack/web/api/endpoints/stars.rb +0 -0
  236. data/lib/slack/web/api/endpoints/team.rb +0 -0
  237. data/lib/slack/web/api/endpoints/team_billing.rb +0 -0
  238. data/lib/slack/web/api/endpoints/team_externalTeams.rb +0 -0
  239. data/lib/slack/web/api/endpoints/team_preferences.rb +0 -0
  240. data/lib/slack/web/api/endpoints/team_profile.rb +0 -0
  241. data/lib/slack/web/api/endpoints/tooling_tokens.rb +0 -0
  242. data/lib/slack/web/api/endpoints/usergroups.rb +0 -0
  243. data/lib/slack/web/api/endpoints/usergroups_users.rb +0 -0
  244. data/lib/slack/web/api/endpoints/users.rb +1 -1
  245. data/lib/slack/web/api/endpoints/users_admin.rb +0 -0
  246. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -0
  247. data/lib/slack/web/api/endpoints/users_prefs.rb +0 -0
  248. data/lib/slack/web/api/endpoints/users_profile.rb +0 -0
  249. data/lib/slack/web/api/endpoints/views.rb +1 -0
  250. data/lib/slack/web/api/endpoints/workflows_featured.rb +0 -0
  251. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +0 -0
  252. data/lib/slack/web/api/endpoints.rb +12 -0
  253. data/lib/slack/web/api/error.rb +0 -0
  254. data/lib/slack/web/api/errors/server_error.rb +0 -0
  255. data/lib/slack/web/api/errors/slack_error.rb +0 -0
  256. data/lib/slack/web/api/errors/too_many_requests_error.rb +0 -0
  257. data/lib/slack/web/api/errors.rb +178 -4
  258. data/lib/slack/web/api/helpers/files.rb +4 -1
  259. data/lib/slack/web/api/helpers.rb +0 -0
  260. data/lib/slack/web/api/mixins/conversations.id.rb +0 -0
  261. data/lib/slack/web/api/mixins/ids.id.rb +3 -1
  262. data/lib/slack/web/api/mixins/users.id.json +0 -0
  263. data/lib/slack/web/api/mixins/users.id.rb +0 -0
  264. data/lib/slack/web/api/mixins/users.search.json +0 -0
  265. data/lib/slack/web/api/mixins/users.search.rb +0 -0
  266. data/lib/slack/web/api/mixins.rb +0 -0
  267. data/lib/slack/web/api/options.rb +0 -0
  268. data/lib/slack/web/api/patches/.gitkeep +0 -0
  269. data/lib/slack/web/api/schema/group.json +0 -0
  270. data/lib/slack/web/api/schema/method.json +0 -0
  271. data/lib/slack/web/api/templates/command.erb +0 -0
  272. data/lib/slack/web/api/templates/endpoints.erb +0 -0
  273. data/lib/slack/web/api/templates/errors.erb +0 -0
  274. data/lib/slack/web/api/templates/method.erb +3 -1
  275. data/lib/slack/web/api/templates/method_spec.erb +32 -3
  276. data/lib/slack/web/client.rb +0 -0
  277. data/lib/slack/web/config.rb +0 -0
  278. data/lib/slack/web/faraday/connection.rb +0 -0
  279. data/lib/slack/web/faraday/options.rb +0 -0
  280. data/lib/slack/web/faraday/request.rb +0 -0
  281. data/lib/slack/web/faraday/response/raise_error.rb +0 -0
  282. data/lib/slack/web/faraday/response/wrap_error.rb +0 -0
  283. data/lib/slack/web/pagination/cursor.rb +0 -0
  284. data/lib/slack-ruby-client.rb +0 -0
  285. data/lib/slack.rb +0 -0
  286. data/lib/slack_ruby_client.rb +0 -0
  287. data/lib/tasks/git.rake +0 -0
  288. data/lib/tasks/update.rake +0 -0
  289. data/lib/tasks/web.rake +7 -2
  290. data/slack-ruby-client.gemspec +0 -0
  291. data/slack.png +0 -0
  292. metadata +17 -9
  293. data/.github/workflows/pr_lint.yml +0 -21
  294. data/Gemfile.danger +0 -6
@@ -6,25 +6,29 @@ module Slack
6
6
  class App
7
7
  desc 'AssistantSearch methods.'
8
8
  command 'assistant_search' do |g|
9
- g.desc 'Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval.'
10
- g.long_desc %( Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval. )
9
+ g.desc 'Searches messages, files, channels and users across your Slack organization.'
10
+ g.long_desc %( Searches messages, files, channels and users across your Slack organization. )
11
11
  g.command 'context' do |c|
12
12
  c.flag 'query', desc: 'User prompt or search query.'
13
13
  c.flag 'action_token', desc: 'Send action_token as received in a message event.'
14
14
  c.flag 'channel_types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
15
15
  c.flag 'content_types', desc: 'Content types to include, a comma-separated list of any combination of messages, files, channels, users.'
16
- c.flag 'include_bots', desc: 'If you want the results to include bots.'
16
+ c.flag 'include_bots', desc: 'Whether the results should include bots.'
17
+ c.flag 'include_deleted_users', desc: 'Whether to include deleted users in the user search results. Defaults to false.'
17
18
  c.flag 'before', desc: 'UNIX timestamp filter. If present, filters for results before this date.'
18
19
  c.flag 'after', desc: 'UNIX timestamp filter. If present, filters for results after this date.'
19
20
  c.flag 'include_context_messages', desc: 'Whether to include context messages surrounding the main message result. Defaults to false if unspecified.'
20
21
  c.flag 'context_channel_id', desc: 'Context channel ID to support scoping the search when applicable.'
21
- c.flag 'cursor', desc: 'The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results.'
22
+ c.flag 'cursor', desc: 'The cursor returned by the API. Leave this blank for the first request and use this to get the next page of results.'
22
23
  c.flag 'limit', desc: 'Number of results to return, up to a max of 20. Defaults to 20.'
23
24
  c.flag 'sort', desc: 'The field to sort the results by. Defaults to score. Can be one of: score, timestamp.'
24
25
  c.flag 'sort_dir', desc: 'The direction to sort the results by. Defaults to desc.'
25
26
  c.flag 'include_message_blocks', desc: 'Whether to return the message blocks in the response.'
26
27
  c.flag 'highlight', desc: 'Whether to highlight the search query in the results. Defaults to false if unspecified.'
27
- c.flag 'term_clauses', desc: 'A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e. conjunctive normal form).'
28
+ c.flag 'term_clauses', desc: 'A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e., conjunctive normal form).'
29
+ c.flag 'modifiers', desc: 'A string containing only modifiers in the format of modifier:value. Search results returned will match the modifier value. For now modifiers only affect term clauses.'
30
+ c.flag 'include_archived_channels', desc: 'Whether to include archived channels in the search results.'
31
+ c.flag 'disable_semantic_search', desc: 'Whether to disable semantic search. When true, only keyword-based search is used. Defaults to false.'
28
32
  c.action do |_global_options, options, _args|
29
33
  puts JSON.dump(@client.assistant_search_context(options))
30
34
  end
@@ -11,7 +11,11 @@ module Slack
11
11
  g.command 'setStatus' do |c|
12
12
  c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
13
13
  c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
14
- c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
14
+ c.flag 'status', desc: "Status of the specified bot user, e.g., 'is thinking...'. A two minute timeout applies, which will cause the status to be removed if no message has been sent."
15
+ c.flag 'loading_messages', desc: 'The list of messages to rotate through as a loading indicator. Maximum of 10 messages.'
16
+ c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
17
+ c.flag 'icon_url', desc: 'Image URL to use as the icon for this message.'
18
+ c.flag 'username', desc: "The bot's username to display."
15
19
  c.action do |_global_options, options, _args|
16
20
  puts JSON.dump(@client.assistant_threads_setStatus(options))
17
21
  end
data/bin/commands/auth.rb CHANGED
File without changes
File without changes
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'Blocks methods.'
8
+ command 'blocks' do |g|
9
+ g.desc 'Validates blocks, messages, and views Block Kit JSON payloads.'
10
+ g.long_desc %( Validates blocks, messages, and views Block Kit JSON payloads. )
11
+ g.command 'validate' do |c|
12
+ c.flag 'blocks', desc: 'A JSON-encoded array of structured blocks. Provide exactly one of blocks, view, or message.'
13
+ c.flag 'message', desc: 'A JSON-encoded message payload to validate. Provide exactly one of blocks, view, or message.'
14
+ c.flag 'view', desc: 'A JSON-encoded view payload to validate. Provide exactly one of blocks, view, or message.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.blocks_validate(options))
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -9,7 +9,7 @@ module Slack
9
9
  g.desc 'Add bookmark to a channel.'
10
10
  g.long_desc %( Add bookmark to a channel. )
11
11
  g.command 'add' do |c|
12
- c.flag 'channel_id', desc: 'Channel to add bookmark in.'
12
+ c.flag 'channel_id', desc: 'Channel to add bookmark in. Required for public channels.'
13
13
  c.flag 'title', desc: 'Title for the bookmark.'
14
14
  c.flag 'link', desc: 'Link to bookmark.'
15
15
  c.flag 'type', desc: 'Type of the bookmark i.e link.'
@@ -25,8 +25,8 @@ module Slack
25
25
  g.desc 'Edit bookmark.'
26
26
  g.long_desc %( Edit bookmark. )
27
27
  g.command 'edit' do |c|
28
- c.flag 'channel_id', desc: 'Channel to update bookmark in.'
29
- c.flag 'bookmark_id', desc: 'Bookmark to update.'
28
+ c.flag 'channel_id', desc: 'Channel to update bookmark in. Required for public channels.'
29
+ c.flag 'bookmark_id', desc: 'Bookmark to update. Required for public channels.'
30
30
  c.flag 'title', desc: 'Title for the bookmark.'
31
31
  c.flag 'link', desc: 'Link to bookmark.'
32
32
  c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
@@ -38,7 +38,7 @@ module Slack
38
38
  g.desc 'List bookmark for the channel.'
39
39
  g.long_desc %( List bookmark for the channel. )
40
40
  g.command 'list' do |c|
41
- c.flag 'channel_id', desc: 'Channel to list bookmarks in.'
41
+ c.flag 'channel_id', desc: 'Channel to list bookmarks in. Required for public channels.'
42
42
  c.action do |_global_options, options, _args|
43
43
  puts JSON.dump(@client.bookmarks_list(options))
44
44
  end
@@ -47,8 +47,8 @@ module Slack
47
47
  g.desc 'Remove bookmark from the channel.'
48
48
  g.long_desc %( Remove bookmark from the channel. )
49
49
  g.command 'remove' do |c|
50
- c.flag 'channel_id', desc: 'Channel to remove bookmark.'
51
- c.flag 'bookmark_id', desc: 'Bookmark to remove.'
50
+ c.flag 'channel_id', desc: 'Channel to remove bookmark. Required for public channels.'
51
+ c.flag 'bookmark_id', desc: 'Bookmark to remove. Required for public channels.'
52
52
  c.flag 'quip_section_id', desc: 'Quip section ID to unbookmark.'
53
53
  c.action do |_global_options, options, _args|
54
54
  puts JSON.dump(@client.bookmarks_remove(options))
data/bin/commands/bots.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/bin/commands/chat.rb CHANGED
@@ -6,6 +6,18 @@ module Slack
6
6
  class App
7
7
  desc 'Chat methods.'
8
8
  command 'chat' do |g|
9
+ g.desc 'Appends text to an existing streaming conversation.'
10
+ g.long_desc %( Appends text to an existing streaming conversation. )
11
+ g.command 'appendStream' do |c|
12
+ c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
13
+ c.flag 'chunks', desc: 'Array of streaming chunks.'
14
+ c.flag 'ts', desc: 'The timestamp of the streaming message.'
15
+ c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is what will be appended to the message received so far.'
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.chat_appendStream(options))
18
+ end
19
+ end
20
+
9
21
  g.desc 'Execute a slash command in a public channel (undocumented)'
10
22
  g.long_desc %( Execute a slash command in a public channel )
11
23
  g.command 'command' do |c|
@@ -87,11 +99,12 @@ module Slack
87
99
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
88
100
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
89
101
  c.flag 'channel', desc: 'An encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See below for more details.'
102
+ c.flag 'current_draft_last_updated_ts', desc: "This field represents the timestamp of the draft's last update at the time this API is called. If the current message is a draft, this field can be provided to ensure synchronization with the server."
90
103
  c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
91
104
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
92
105
  c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
93
106
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
94
- c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
107
+ c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. You can also provide Work Object entity metadata using this parameter. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
95
108
  c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
96
109
  c.flag 'parse', desc: 'Change how messages are treated. See below.'
97
110
  c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
@@ -127,12 +140,44 @@ module Slack
127
140
  end
128
141
  end
129
142
 
143
+ g.desc 'Starts a new streaming conversation.'
144
+ g.long_desc %( Starts a new streaming conversation. )
145
+ g.command 'startStream' do |c|
146
+ c.flag 'channel', desc: 'An encoded ID that represents a channel thread or DM.'
147
+ c.flag 'chunks', desc: 'Array of streaming chunks.'
148
+ c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
149
+ c.flag 'thread_ts', desc: "Provide another message's ts value to reply to. Streamed messages should always be replies to a user request."
150
+ c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.'
151
+ c.flag 'recipient_team_id', desc: 'The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.'
152
+ c.flag 'task_display_mode', desc: "Specifies how tasks are displayed in the message. A timeline displays individual tasks with text in sequential order, plan displays all tasks together, with the first tasks's placement determining the placement of the rest of the tasks, and dense collapses consecutive tool calls into a single summarized task card."
153
+ c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
154
+ c.flag 'icon_url', desc: 'Image URL to use as the icon for this message.'
155
+ c.flag 'username', desc: "The bot's username to display."
156
+ c.action do |_global_options, options, _args|
157
+ puts JSON.dump(@client.chat_startStream(options))
158
+ end
159
+ end
160
+
161
+ g.desc 'Stops a streaming conversation.'
162
+ g.long_desc %( Stops a streaming conversation. )
163
+ g.command 'stopStream' do |c|
164
+ c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
165
+ c.flag 'chunks', desc: 'Array of streaming chunks.'
166
+ c.flag 'ts', desc: 'The timestamp of the streaming message.'
167
+ c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
168
+ c.flag 'blocks', desc: 'A list of blocks that will be rendered at the bottom of the finalized message.'
169
+ c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
170
+ c.action do |_global_options, options, _args|
171
+ puts JSON.dump(@client.chat_stopStream(options))
172
+ end
173
+ end
174
+
130
175
  g.desc 'Provide custom unfurl behavior for user-posted URLs'
131
176
  g.long_desc %( Provide custom unfurl behavior for user-posted URLs )
132
177
  g.command 'unfurl' do |c|
133
- c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.'
134
- c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
135
- c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.'
178
+ c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together. Required for public channels.'
179
+ c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to. Required for public channels.'
180
+ c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Required for public channels.'
136
181
  c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.'
137
182
  c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.'
138
183
  c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.'
@@ -149,6 +194,7 @@ module Slack
149
194
  g.command 'update' do |c|
150
195
  c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
151
196
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
197
+ c.flag 'unfurled_attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
152
198
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
153
199
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
154
200
  c.flag 'metadata', desc: "JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous metadata will be retained. To remove previous metadata, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace."
File without changes
@@ -24,7 +24,7 @@ module Slack
24
24
  g.long_desc %( Approves an invitation to a Slack Connect channel )
25
25
  g.command 'approveSharedInvite' do |c|
26
26
  c.flag 'invite_id', desc: 'ID of the shared channel invite to approve.'
27
- c.flag 'target_team', desc: 'The team or enterprise id of the other party involved in the invitation you are approving.'
27
+ c.flag 'target_team', desc: 'The team or enterprise ID of the receiving party involved in the invitation you are approving.'
28
28
  c.action do |_global_options, options, _args|
29
29
  puts JSON.dump(@client.conversations_approveSharedInvite(options))
30
30
  end
File without changes
File without changes
File without changes
data/bin/commands/dnd.rb CHANGED
File without changes
File without changes
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'Entity methods.'
8
+ command 'entity' do |g|
9
+ g.desc 'Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.'
10
+ g.long_desc %( Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client. )
11
+ g.command 'presentDetails' do |c|
12
+ c.flag 'metadata', desc: 'URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID.'
13
+ c.flag 'trigger_id', desc: 'A reference to the original user action that initiated the request.'
14
+ c.flag 'user_auth_required', desc: 'Set to true (or 1) to indicate that the user must authenticate to view full flexpane data.'
15
+ c.flag 'user_auth_url', desc: 'A custom URL to which users are directed for authentication if required.'
16
+ c.flag 'error', desc: ''
17
+ c.action do |_global_options, options, _args|
18
+ puts JSON.dump(@client.entity_presentDetails(options))
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -12,7 +12,7 @@ module Slack
12
12
  c.flag 'files', desc: 'Array of file ids and their corresponding (optional) titles.'
13
13
  c.flag 'channel_id', desc: 'Channel ID where the file will be shared. If not specified the file will be private.'
14
14
  c.flag 'thread_ts', desc: "Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'."
15
- c.flag 'channels', desc: 'Comma-separated string of channel IDs where the file will be shared.'
15
+ c.flag 'channels', desc: 'Comma-separated string of channel IDs or user IDs where the file will be shared.'
16
16
  c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
17
17
  c.flag 'blocks', desc: 'A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
18
18
  c.action do |_global_options, options, _args|
@@ -63,8 +63,8 @@ module Slack
63
63
  end
64
64
  end
65
65
 
66
- g.desc 'List for a team, in a channel, or from a user with applied filters.'
67
- g.long_desc %( List for a team, in a channel, or from a user with applied filters. )
66
+ g.desc 'List files for a team, in a channel, or from a user with applied filters.'
67
+ g.long_desc %( List files for a team, in a channel, or from a user with applied filters. )
68
68
  g.command 'list' do |c|
69
69
  c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
70
70
  c.flag 'show_files_hidden_by_limit', desc: 'Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -12,9 +12,11 @@ module Slack
12
12
  c.flag 'client_id', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
13
13
  c.flag 'client_secret', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
14
14
  c.flag 'code', desc: 'The code param returned via the OAuth callback.'
15
+ c.flag 'code_verifier', desc: 'The code_verifier param used to generate the code_challenge originally. Used for PKCE.'
15
16
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
16
17
  c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
17
18
  c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
19
+ c.flag 'assertion', desc: 'Identity assertion JWT authorization grant.'
18
20
  c.action do |_global_options, options, _args|
19
21
  puts JSON.dump(@client.oauth_v2_access(options))
20
22
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'OauthV2User methods.'
8
+ command 'oauth_v2_user' do |g|
9
+ g.desc 'Exchanges a temporary OAuth verifier code for a user access token.'
10
+ g.long_desc %( Exchanges a temporary OAuth verifier code for a user access token. )
11
+ g.command 'access' do |c|
12
+ c.flag 'client_id', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
13
+ c.flag 'client_secret', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
14
+ c.flag 'code', desc: 'The code param returned via the OAuth callback.'
15
+ c.flag 'code_verifier', desc: 'The code_verifier param used to generate the code_challenge originally. Used for PKCE.'
16
+ c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
17
+ c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
18
+ c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
19
+ c.flag 'assertion', desc: 'Identity assertion JWT authorization grant.'
20
+ c.action do |_global_options, options, _args|
21
+ puts JSON.dump(@client.oauth_v2_user_access(options))
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -15,6 +15,7 @@ module Slack
15
15
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
16
16
  c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
17
17
  c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
18
+ c.flag 'code_verifier', desc: 'PKCE code verifier (RFC 7636). Required when the authorization request included a code_challenge.'
18
19
  c.action do |_global_options, options, _args|
19
20
  puts JSON.dump(@client.openid_connect_token(options))
20
21
  end
data/bin/commands/pins.rb CHANGED
File without changes
File without changes
File without changes
data/bin/commands/rtm.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/bin/commands/team.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -6,8 +6,8 @@ module Slack
6
6
  class App
7
7
  desc 'Users methods.'
8
8
  command 'users' do |g|
9
- g.desc 'List conversations the calling user may access.'
10
- g.long_desc %( List conversations the calling user may access. )
9
+ g.desc 'List conversations the calling user is a member of.'
10
+ g.long_desc %( List conversations the calling user is a member of. )
11
11
  g.command 'conversations' do |c|
12
12
  c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
13
13
  c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.'
File without changes
File without changes
File without changes
File without changes
@@ -23,6 +23,7 @@ module Slack
23
23
  c.flag 'user_id', desc: 'id of the user you want publish a view to.'
24
24
  c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
25
25
  c.flag 'hash', desc: 'A string that represents view state to protect against possible race conditions.'
26
+ c.flag 'interactivity_pointer', desc: ''
26
27
  c.action do |_global_options, options, _args|
27
28
  puts JSON.dump(@client.views_publish(options))
28
29
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,11 +1,11 @@
1
1
  Obtain a user OAuth token from Slack.
2
2
 
3
- Create a Slack app [here](https://api.slack.com/tutorials/tracks/getting-a-token).
3
+ Create a Slack app [here](https://api.slack.com/tutorials/tracks/getting-a-token).
4
4
 
5
5
  The new app has a pre-configured User OAuth Token which you can use for most of the examples.
6
6
  However you may want to obtain a token for a different user, which can be accomplished as follows.
7
7
 
8
- To test locally use [ngrok](https://ngrok.com/) to expose your local server to the internet.
8
+ To test locally use [ngrok](https://ngrok.com/) to expose your local server to the internet.
9
9
 
10
10
  ```sh
11
11
  ngrok http 4242
@@ -27,7 +27,7 @@ Run the example.
27
27
 
28
28
  ```sh
29
29
  bundle install
30
- bundle exec dotenv ruby oauth_v2.rb
30
+ bundle exec dotenv ruby oauth_v2.rb
31
31
  ```
32
32
 
33
33
  A browser window will open to complete the OAuth flow.
data/lib/slack/config.rb CHANGED
File without changes
File without changes
File without changes
data/lib/slack/logger.rb CHANGED
File without changes
File without changes
File without changes
File without changes
data/lib/slack/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Slack
3
- VERSION = '3.0.0'
3
+ VERSION = '3.2.0'
4
4
  end
File without changes
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module AdminAnalyticsMessages
9
+ #
10
+ # Retrieves activity metrics for messages from a given channel.
11
+ #
12
+ # @option options [channel] :channel
13
+ # Channel ID for channel of the message activity to query.
14
+ # @option options [string] :oldest_ts
15
+ # Oldest timestamp to include in the results. Defaults to 7 days before current time. If not passed while still passing the latest_ts parameter, defaults to 7 days before latest_ts.
16
+ # @option options [string] :latest_ts
17
+ # Most recent timestamp to include in results. Defaults to current time. If not passed while still passing the oldest_ts parameter, defaults to 7 days after oldest_ts.
18
+ # @option options [string] :cursor
19
+ # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.
20
+ # @option options [integer] :limit
21
+ # Maximum number of entries to return. The maximum limit is 100.
22
+ # @see https://api.slack.com/methods/admin.analytics.messages.activity
23
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics.messages/admin.analytics.messages.activity.json
24
+ def admin_analytics_messages_activity(options = {})
25
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
26
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
27
+ if block_given?
28
+ Pagination::Cursor.new(self, :admin_analytics_messages_activity, options).each do |page|
29
+ yield page
30
+ end
31
+ else
32
+ post('admin.analytics.messages.activity', options)
33
+ end
34
+ end
35
+
36
+ #
37
+ # Retrieves metadata for a list of messages from a given channel.
38
+ #
39
+ # @option options [channel] :channel
40
+ # Channel ID for channel containing the messages to query.
41
+ # @option options [string] :oldest_ts
42
+ # Oldest timestamp to include in the results.
43
+ # @option options [string] :latest_ts
44
+ # Most recent timestamp to include in the results. If not passed, defaults to current time.
45
+ # @option options [string] :cursor
46
+ # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more details.
47
+ # @see https://api.slack.com/methods/admin.analytics.messages.metadata
48
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics.messages/admin.analytics.messages.metadata.json
49
+ def admin_analytics_messages_metadata(options = {})
50
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
51
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
52
+ if block_given?
53
+ Pagination::Cursor.new(self, :admin_analytics_messages_metadata, options).each do |page|
54
+ yield page
55
+ end
56
+ else
57
+ post('admin.analytics.messages.metadata', options)
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end