From 77af58f25783032051a1528535bffce7d2b9a9a4 Mon Sep 17 00:00:00 2001 From: dblock Date: Tue, 9 Apr 2019 22:17:15 -0500 Subject: [PATCH] rake slack:api:update --- .rubocop_todo.yml | 9 ++- bin/commands.rb | 1 + bin/commands/api.rb | 4 +- bin/commands/apps.rb | 4 +- bin/commands/apps_permissions.rb | 8 +-- bin/commands/apps_permissions_resources.rb | 4 +- bin/commands/apps_permissions_scopes.rb | 4 +- bin/commands/apps_permissions_users.rb | 8 +-- bin/commands/auth.rb | 8 +-- bin/commands/bots.rb | 4 +- bin/commands/channels.rb | 63 ++++++++-------- bin/commands/chat.rb | 65 ++++++++++++----- bin/commands/chat_scheduledMessages.rb | 17 +++++ bin/commands/conversations.rb | 70 +++++++++--------- bin/commands/dialog.rb | 4 +- bin/commands/dnd.rb | 18 ++--- bin/commands/emoji.rb | 4 +- bin/commands/files.rb | 39 ++++------ bin/commands/files_comments.rb | 25 +------ bin/commands/groups.rb | 66 ++++++++--------- bin/commands/im.rb | 26 +++---- bin/commands/migration.rb | 4 +- bin/commands/mpim.rb | 22 +++--- bin/commands/oauth.rb | 8 +-- bin/commands/pins.rb | 12 ++-- bin/commands/reactions.rb | 16 ++--- bin/commands/reminders.rb | 20 +++--- bin/commands/rtm.rb | 8 +-- bin/commands/search.rb | 14 ++-- bin/commands/stars.rb | 12 ++-- bin/commands/team.rb | 16 ++--- bin/commands/team_profile.rb | 4 +- bin/commands/usergroups.rb | 22 +++--- bin/commands/usergroups_users.rb | 8 +-- bin/commands/users.rb | 43 ++++++----- bin/commands/users_profile.rb | 8 +-- lib/slack/web/api/endpoints.rb | 2 + lib/slack/web/api/endpoints/api.rb | 2 +- lib/slack/web/api/endpoints/apps.rb | 2 +- .../web/api/endpoints/apps_permissions.rb | 4 +- .../endpoints/apps_permissions_resources.rb | 2 +- .../api/endpoints/apps_permissions_scopes.rb | 2 +- .../api/endpoints/apps_permissions_users.rb | 4 +- lib/slack/web/api/endpoints/auth.rb | 4 +- lib/slack/web/api/endpoints/bots.rb | 2 +- lib/slack/web/api/endpoints/channels.rb | 33 +++++---- lib/slack/web/api/endpoints/chat.rb | 72 ++++++++++++++++--- .../api/endpoints/chat_scheduledMessages.rb | 37 ++++++++++ lib/slack/web/api/endpoints/conversations.rb | 34 ++++----- lib/slack/web/api/endpoints/dialog.rb | 2 +- lib/slack/web/api/endpoints/dnd.rb | 8 +-- lib/slack/web/api/endpoints/emoji.rb | 2 +- lib/slack/web/api/endpoints/files.rb | 25 ++----- lib/slack/web/api/endpoints/files_comments.rb | 35 +-------- lib/slack/web/api/endpoints/groups.rb | 34 ++++----- lib/slack/web/api/endpoints/im.rb | 14 ++-- lib/slack/web/api/endpoints/migration.rb | 2 +- lib/slack/web/api/endpoints/mpim.rb | 12 ++-- lib/slack/web/api/endpoints/oauth.rb | 4 +- lib/slack/web/api/endpoints/pins.rb | 8 ++- lib/slack/web/api/endpoints/reactions.rb | 10 +-- lib/slack/web/api/endpoints/reminders.rb | 10 +-- lib/slack/web/api/endpoints/rtm.rb | 4 +- lib/slack/web/api/endpoints/search.rb | 6 +- lib/slack/web/api/endpoints/stars.rb | 8 ++- lib/slack/web/api/endpoints/team.rb | 9 +-- lib/slack/web/api/endpoints/team_profile.rb | 2 +- lib/slack/web/api/endpoints/usergroups.rb | 10 +-- .../web/api/endpoints/usergroups_users.rb | 4 +- lib/slack/web/api/endpoints/users.rb | 24 +++---- lib/slack/web/api/endpoints/users_profile.rb | 4 +- lib/slack/web/api/slack-api-ref | 2 +- .../endpoints/chat_scheduledMessages_spec.rb | 7 ++ .../web/api/endpoints/files_comments_spec.rb | 19 ----- 74 files changed, 603 insertions(+), 530 deletions(-) create mode 100644 bin/commands/chat_scheduledMessages.rb create mode 100644 lib/slack/web/api/endpoints/chat_scheduledMessages.rb create mode 100644 spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2235aaca..71db869c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-04-07 11:03:29 -0400 using RuboCop version 0.61.1. +# on 2019-04-09 22:16:03 -0500 using RuboCop version 0.61.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -20,12 +20,15 @@ Lint/HandleExceptions: - 'spec/slack/real_time/concurrency/celluloid_spec.rb' - 'spec/slack/real_time/concurrency/eventmachine_spec.rb' -# Offense count: 1 +# Offense count: 4 # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS Naming/FileName: Exclude: + - 'bin/commands/chat_scheduledMessages.rb' - 'lib/slack-ruby-client.rb' + - 'lib/slack/web/api/endpoints/chat_scheduledMessages.rb' + - 'spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb' # Offense count: 1 # Configuration parameters: EnforcedStyleForLeadingUnderscores. @@ -47,7 +50,7 @@ Style/AccessModifierDeclarations: - 'lib/slack/real_time/concurrency/eventmachine.rb' - 'lib/slack/real_time/socket.rb' -# Offense count: 153 +# Offense count: 154 # Configuration parameters: AllowedVariables. Style/GlobalVars: Enabled: false diff --git a/bin/commands.rb b/bin/commands.rb index 50ad61ab..b847cdb7 100644 --- a/bin/commands.rb +++ b/bin/commands.rb @@ -10,6 +10,7 @@ require 'commands/bots' require 'commands/channels' require 'commands/chat' +require 'commands/chat_scheduledMessages' require 'commands/conversations' require 'commands/dialog' require 'commands/dnd' diff --git a/bin/commands/api.rb b/bin/commands/api.rb index 0c0af72c..6753885b 100644 --- a/bin/commands/api.rb +++ b/bin/commands/api.rb @@ -2,8 +2,8 @@ desc 'Api methods.' command 'api' do |g| - g.desc 'Checks API calling code.' - g.long_desc %( Checks API calling code. ) + g.desc 'This method helps you test your calling code.' + g.long_desc %( This method helps you test your calling code. ) g.command 'test' do |c| c.flag 'error', desc: 'Error response to return.' c.flag 'foo', desc: 'example property to return.' diff --git a/bin/commands/apps.rb b/bin/commands/apps.rb index 3843b973..1c5c4c20 100644 --- a/bin/commands/apps.rb +++ b/bin/commands/apps.rb @@ -2,8 +2,8 @@ desc 'Apps methods.' command 'apps' do |g| - g.desc 'Uninstalls your app from a workspace.' - g.long_desc %( Uninstalls your app from a workspace. ) + g.desc 'This method uninstalls a workspace app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of a workspace app.' + g.long_desc %( This method uninstalls a workspace app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of a workspace app. ) g.command 'uninstall' do |c| c.flag 'client_id', desc: 'Issued when you created your application.' c.flag 'client_secret', desc: 'Issued when you created your application.' diff --git a/bin/commands/apps_permissions.rb b/bin/commands/apps_permissions.rb index 904319e4..324f24ee 100644 --- a/bin/commands/apps_permissions.rb +++ b/bin/commands/apps_permissions.rb @@ -2,16 +2,16 @@ desc 'AppsPermissions methods.' command 'apps_permissions' do |g| - g.desc 'Returns list of permissions this app has on a team.' - g.long_desc %( Returns list of permissions this app has on a team. ) + g.desc 'This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months.' + g.long_desc %( This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. ) g.command 'info' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.apps_permissions_info(options)) end end - g.desc 'Allows an app to request additional scopes' - g.long_desc %( Allows an app to request additional scopes ) + g.desc 'This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months.' + g.long_desc %( This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. ) g.command 'request' do |c| c.flag 'scopes', desc: 'A comma separated list of scopes to request for.' c.flag 'trigger_id', desc: 'Token used to trigger the permissions API.' diff --git a/bin/commands/apps_permissions_resources.rb b/bin/commands/apps_permissions_resources.rb index 915a8c0a..9c5d77d9 100644 --- a/bin/commands/apps_permissions_resources.rb +++ b/bin/commands/apps_permissions_resources.rb @@ -2,8 +2,8 @@ desc 'AppsPermissionsResources methods.' command 'apps_permissions_resources' do |g| - g.desc 'Returns list of resource grants this app has on a team.' - g.long_desc %( Returns list of resource grants this app has on a team. ) + g.desc 'This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months.' + g.long_desc %( This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. ) g.command 'list' do |c| 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." c.flag 'limit', desc: 'The maximum number of items to return.' diff --git a/bin/commands/apps_permissions_scopes.rb b/bin/commands/apps_permissions_scopes.rb index 8f63542a..64c7c814 100644 --- a/bin/commands/apps_permissions_scopes.rb +++ b/bin/commands/apps_permissions_scopes.rb @@ -2,8 +2,8 @@ desc 'AppsPermissionsScopes methods.' command 'apps_permissions_scopes' do |g| - g.desc 'Returns list of scopes this app has on a team.' - g.long_desc %( Returns list of scopes this app has on a team. ) + g.desc 'This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months.' + g.long_desc %( This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. ) g.command 'list' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.apps_permissions_scopes_list(options)) diff --git a/bin/commands/apps_permissions_users.rb b/bin/commands/apps_permissions_users.rb index 6b9f57f9..47d08c7d 100644 --- a/bin/commands/apps_permissions_users.rb +++ b/bin/commands/apps_permissions_users.rb @@ -2,8 +2,8 @@ desc 'AppsPermissionsUsers methods.' command 'apps_permissions_users' do |g| - g.desc 'Returns list of user grants and corresponding scopes this app has on a team.' - g.long_desc %( Returns list of user grants and corresponding scopes this app has on a team. ) + g.desc 'This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months.' + g.long_desc %( This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. ) g.command 'list' do |c| 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." c.flag 'limit', desc: 'The maximum number of items to return.' @@ -12,8 +12,8 @@ end end - g.desc 'Enables an app to trigger a permissions modal to grant an app access to a user access scope.' - g.long_desc %( Enables an app to trigger a permissions modal to grant an app access to a user access scope. ) + g.desc 'This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months.' + g.long_desc %( This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. ) g.command 'request' do |c| c.flag 'scopes', desc: 'A comma separated list of user scopes to request for.' c.flag 'trigger_id', desc: 'Token used to trigger the request.' diff --git a/bin/commands/auth.rb b/bin/commands/auth.rb index 106528cf..047faaad 100644 --- a/bin/commands/auth.rb +++ b/bin/commands/auth.rb @@ -2,8 +2,8 @@ desc 'Auth methods.' command 'auth' do |g| - g.desc 'Revokes a token.' - g.long_desc %( Revokes a token. ) + g.desc 'This method revokes an access token. Use it when you no longer need a token. For example, with a Sign In With Slack app, call this to log a user out.' + g.long_desc %( This method revokes an access token. Use it when you no longer need a token. For example, with a Sign In With Slack app, call this to log a user out. ) g.command 'revoke' do |c| c.flag 'test', desc: 'Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked.' c.action do |_global_options, options, _args| @@ -11,8 +11,8 @@ end end - g.desc 'Checks authentication & identity.' - g.long_desc %( Checks authentication & identity. ) + g.desc 'This method checks authentication and tells "you" who you are, even if you might be a bot.' + g.long_desc %( This method checks authentication and tells "you" who you are, even if you might be a bot. ) g.command 'test' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.auth_test(options)) diff --git a/bin/commands/bots.rb b/bin/commands/bots.rb index b6ae0239..1e37dc9d 100644 --- a/bin/commands/bots.rb +++ b/bin/commands/bots.rb @@ -2,8 +2,8 @@ desc 'Bots methods.' command 'bots' do |g| - g.desc 'Gets information about a bot user.' - g.long_desc %( Gets information about a bot user. ) + g.desc 'This method returns extended information about a bot user.' + g.long_desc %( This method returns extended information about a bot user. ) g.command 'info' do |c| c.flag 'bot', desc: 'Bot user to get info on.' c.action do |_global_options, options, _args| diff --git a/bin/commands/channels.rb b/bin/commands/channels.rb index e8f6a513..73714334 100644 --- a/bin/commands/channels.rb +++ b/bin/commands/channels.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc "Get info on your team's Slack channels, create or archive channels, invite users, set the topic and purpose, and mark a channel as read." +desc 'Channels methods.' command 'channels' do |g| - g.desc 'Archives a channel.' - g.long_desc %( Archives a channel. ) + g.desc 'This method archives a channel.' + g.long_desc %( This method archives a channel. ) g.command 'archive' do |c| c.flag 'channel', desc: 'Channel to archive.' c.action do |_global_options, options, _args| @@ -11,8 +11,8 @@ end end - g.desc 'Creates a channel.' - g.long_desc %( Creates a channel. ) + g.desc 'This method is used to create a channel.' + g.long_desc %( This method is used to create a channel. ) g.command 'create' do |c| c.flag 'name', desc: 'Name of channel to create.' c.flag 'validate', desc: 'Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.' @@ -30,8 +30,8 @@ end end - g.desc 'Fetches history of messages and events from a channel.' - g.long_desc %( Fetches history of messages and events from a channel. ) + g.desc 'This method returns a portion of message events from the specified public channel.' + g.long_desc %( This method returns a portion of message events from the specified public channel. ) g.command 'history' do |c| c.flag 'channel', desc: 'Channel to fetch history for.' c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results.' @@ -52,8 +52,8 @@ end end - g.desc 'Gets information about a channel.' - g.long_desc %( Gets information about a channel. ) + g.desc 'This method returns information about a team channel.' + g.long_desc %( This method returns information about a team channel. ) g.command 'info' do |c| c.flag 'channel', desc: 'Channel to get info on.' c.flag 'include_locale', desc: 'Set this to true to receive the locale for this channel. Defaults to false.' @@ -62,8 +62,8 @@ end end - g.desc 'Invites a user to a channel.' - g.long_desc %( Invites a user to a channel. ) + g.desc 'This method is used to invite a user to a channel. The calling user must be a member of the channel.' + g.long_desc %( This method is used to invite a user to a channel. The calling user must be a member of the channel. ) g.command 'invite' do |c| c.flag 'channel', desc: 'Channel to invite user to.' c.flag 'user', desc: 'User to invite to channel.' @@ -72,8 +72,8 @@ end end - g.desc 'Joins a channel, creating it if needed.' - g.long_desc %( Joins a channel, creating it if needed. ) + g.desc 'This method is used to join a channel. If the channel does not exist, it is' + g.long_desc %( This method is used to join a channel. If the channel does not exist, it is created. ) g.command 'join' do |c| c.flag 'name', desc: 'Name of channel to join.' c.flag 'validate', desc: 'Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.' @@ -82,8 +82,8 @@ end end - g.desc 'Removes a user from a channel.' - g.long_desc %( Removes a user from a channel. ) + g.desc 'This method allows a user to remove another member from a team channel.' + g.long_desc %( This method allows a user to remove another member from a team channel. ) g.command 'kick' do |c| c.flag 'channel', desc: 'Channel to remove user from.' c.flag 'user', desc: 'User to remove from channel.' @@ -92,8 +92,8 @@ end end - g.desc 'Leaves a channel.' - g.long_desc %( Leaves a channel. ) + g.desc 'This method is used to leave a channel.' + g.long_desc %( This method is used to leave a channel. ) g.command 'leave' do |c| c.flag 'channel', desc: 'Channel to leave.' c.action do |_global_options, options, _args| @@ -101,8 +101,8 @@ end end - g.desc 'Lists all channels in a Slack team.' - g.long_desc %( Lists all channels in a Slack team. ) + g.desc "Don't use this method. Use conversations.list instead." + g.long_desc %( Don't use this method. Use conversations.list instead. ) g.command 'list' do |c| 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." c.flag 'exclude_archived', desc: 'Exclude archived channels from the list.' @@ -113,8 +113,8 @@ end end - g.desc 'Sets the read cursor in a channel.' - g.long_desc %( Sets the read cursor in a channel. ) + g.desc 'This method moves the read cursor in a channel.' + g.long_desc %( This method moves the read cursor in a channel. ) g.command 'mark' do |c| c.flag 'channel', desc: 'Channel to set reading cursor in.' c.flag 'ts', desc: 'Timestamp of the most recently seen message.' @@ -123,8 +123,8 @@ end end - g.desc 'Renames a channel.' - g.long_desc %( Renames a channel. ) + g.desc 'This method renames a team channel.' + g.long_desc %( This method renames a team channel. ) g.command 'rename' do |c| c.flag 'channel', desc: 'Channel to rename.' c.flag 'name', desc: 'New name for channel.' @@ -134,8 +134,8 @@ end end - g.desc 'Retrieve a thread of messages posted to a channel' - g.long_desc %( Retrieve a thread of messages posted to a channel ) + g.desc 'This method returns an entire thread (a message plus all the messages in reply to it).' + g.long_desc %( This method returns an entire thread (a message plus all the messages in reply to it). ) g.command 'replies' do |c| c.flag 'channel', desc: 'Channel to fetch thread from.' c.flag 'thread_ts', desc: "Unique identifier of a thread's parent message." @@ -144,18 +144,19 @@ end end - g.desc 'Sets the purpose for a channel.' - g.long_desc %( Sets the purpose for a channel. ) + g.desc 'This method is used to change the purpose of a channel. The calling user must be a member of the channel.' + g.long_desc %( This method is used to change the purpose of a channel. The calling user must be a member of the channel. ) g.command 'setPurpose' do |c| c.flag 'channel', desc: 'Channel to set the purpose of.' c.flag 'purpose', desc: 'The new purpose.' + c.flag 'name_tagging', desc: 'if it is true, treat this like a message and not an unescaped thing.' c.action do |_global_options, options, _args| puts JSON.dump($client.channels_setPurpose(options)) end end - g.desc 'Sets the topic for a channel.' - g.long_desc %( Sets the topic for a channel. ) + g.desc 'This method is used to change the topic of a channel. The calling user must be a member of the channel.' + g.long_desc %( This method is used to change the topic of a channel. The calling user must be a member of the channel. ) g.command 'setTopic' do |c| c.flag 'channel', desc: 'Channel to set the topic of.' c.flag 'topic', desc: 'The new topic.' @@ -164,8 +165,8 @@ end end - g.desc 'Unarchives a channel.' - g.long_desc %( Unarchives a channel. ) + g.desc 'This method unarchives a channel. The calling user is added to the channel.' + g.long_desc %( This method unarchives a channel. The calling user is added to the channel. ) g.command 'unarchive' do |c| c.flag 'channel', desc: 'Channel to unarchive.' c.action do |_global_options, options, _args| diff --git a/bin/commands/chat.rb b/bin/commands/chat.rb index ecd64bc1..e61d3908 100644 --- a/bin/commands/chat.rb +++ b/bin/commands/chat.rb @@ -1,6 +1,6 @@ # This file was auto-generated by lib/tasks/web.rake -desc 'Post chat messages to Slack.' +desc 'Chat methods.' command 'chat' do |g| g.desc 'Execute a slash command in a public channel (undocumented)' g.long_desc %( Execute a slash command in a public channel ) @@ -13,8 +13,8 @@ end end - g.desc 'Deletes a message.' - g.long_desc %( Deletes a message. ) + g.desc 'This method deletes a message from a channel.' + g.long_desc %( This method deletes a message from a channel. ) g.command 'delete' do |c| c.flag 'channel', desc: 'Channel containing the message to be deleted.' c.flag 'ts', desc: 'Timestamp of the message to be deleted.' @@ -24,8 +24,19 @@ end end - g.desc 'Retrieve a permalink URL for a specific extant message' - g.long_desc %( Retrieve a permalink URL for a specific extant message ) + g.desc 'This method deletes a pending scheduled message before it is sent.' + g.long_desc %( This method deletes a pending scheduled message before it is sent. ) + g.command 'deleteScheduledMessage' do |c| + c.flag 'channel', desc: 'The channel the scheduled_message is posting to.' + c.flag 'scheduled_message_id', desc: 'scheduled_message_id returned from call to chat.scheduleMessage.' + c.flag 'as_user', desc: 'Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.' + c.action do |_global_options, options, _args| + puts JSON.dump($client.chat_deleteScheduledMessage(options)) + end + end + + g.desc 'Easily exchange a message timestamp and a channel ID for a friendly HTTP-based permalink to that message. Handles message threads and all conversation types.' + g.long_desc %( Easily exchange a message timestamp and a channel ID for a friendly HTTP-based permalink to that message. Handles message threads and all conversation types. ) g.command 'getPermalink' do |c| c.flag 'channel', desc: 'The ID of the conversation or channel containing the message.' c.flag 'message_ts', desc: "A message's ts value, uniquely identifying it within a channel." @@ -34,8 +45,8 @@ end end - g.desc 'Share a me message into a channel.' - g.long_desc %( Share a me message into a channel. ) + g.desc 'This method sends a me message to a channel from the calling user.' + g.long_desc %( This method sends a me message to a channel from the calling user. ) g.command 'meMessage' do |c| c.flag 'channel', desc: 'Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.' c.flag 'text', desc: 'Text of the message to send.' @@ -44,8 +55,8 @@ end end - g.desc 'Sends an ephemeral message to a user in a channel.' - g.long_desc %( Sends an ephemeral message to a user in a channel. ) + g.desc 'This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation.' + g.long_desc %( This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation. ) g.command 'postEphemeral' do |c| c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.' c.flag 'text', desc: "Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead." @@ -55,14 +66,14 @@ c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.' c.flag 'link_names', desc: 'Find and link channel names and usernames.' c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.' - c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead." + c.flag 'thread_ts', desc: "Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread." c.action do |_global_options, options, _args| puts JSON.dump($client.chat_postEphemeral(options)) end end - g.desc 'Sends a message to a channel.' - g.long_desc %( Sends a message to a channel. ) + g.desc 'This method posts a message to a public channel, private channel, or direct message/IM channel.' + g.long_desc %( This method posts a message to a public channel, private channel, or direct message/IM channel. ) g.command 'postMessage' do |c| c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.' c.flag 'text', desc: "Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead. Provide no more than 40,000 characters or risk truncation." @@ -84,12 +95,32 @@ end end - g.desc 'Provide custom unfurl behavior for user-posted URLs' - g.long_desc %( Provide custom unfurl behavior for user-posted URLs ) + g.desc 'This method schedules a message for delivery to a public channel, private channel, or direct message/IM channel at a specified time in the future.' + g.long_desc %( This method schedules a message for delivery to a public channel, private channel, or direct message/IM channel at a specified time in the future. ) + g.command 'scheduleMessage' do |c| + c.flag 'channel', desc: 'Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.' + c.flag 'post_at', desc: 'Unix EPOCH timestamp of time in future to send the message.' + c.flag 'text', desc: "Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead. Provide no more than 40,000 characters or risk truncation." + c.flag 'as_user', desc: 'Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.' + c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.' + c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.' + c.flag 'link_names', desc: 'Find and link channel names and usernames.' + c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.' + 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.' + c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead." + c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.' + c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.' + c.action do |_global_options, options, _args| + puts JSON.dump($client.chat_scheduleMessage(options)) + end + end + + g.desc 'This method attaches Slack app unfurl behavior to a specified and relevant message. A user token is required as this method does not support bot user tokens.' + g.long_desc %( This method attaches Slack app unfurl behavior to a specified and relevant message. A user token is required as this method does not support bot user tokens. ) g.command 'unfurl' do |c| c.flag 'channel', desc: 'Channel ID of the message.' c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.' - c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl message attachments.' + 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.' 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.' 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.' 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.' @@ -98,8 +129,8 @@ end end - g.desc 'Updates a message.' - g.long_desc %( Updates a message. ) + g.desc 'This method updates a message in a channel. Though related to chat.postMessage, some parameters of chat.update are handled differently.' + g.long_desc %( This method updates a message in a channel. Though related to chat.postMessage, some parameters of chat.update are handled differently. ) g.command 'update' do |c| c.flag 'channel', desc: 'Channel containing the message to be updated.' c.flag 'text', desc: "New text for the message, using the default formatting rules. It's not required when presenting attachments." diff --git a/bin/commands/chat_scheduledMessages.rb b/bin/commands/chat_scheduledMessages.rb new file mode 100644 index 00000000..f8fdc72b --- /dev/null +++ b/bin/commands/chat_scheduledMessages.rb @@ -0,0 +1,17 @@ +# This file was auto-generated by lib/tasks/web.rake + +desc 'ChatScheduledmessages methods.' +command 'chat_scheduledMessages' do |g| + g.desc 'This method returns a list of pending scheduled messages.' + g.long_desc %( This method returns a list of pending scheduled messages. ) + g.command 'list' do |c| + c.flag 'channel', desc: 'The channel of the scheduled messages.' + c.flag 'cursor', desc: 'For pagination purposes, this is the cursor value returned from a previous call to chat.scheduledmessages.list indicating where you want to start this call from.' + c.flag 'latest', desc: 'A UNIX timestamp of the latest value in the time range.' + c.flag 'limit', desc: 'Maximum number of original entries to return.' + c.flag 'oldest', desc: 'A UNIX timestamp of the oldest value in the time range.' + c.action do |_global_options, options, _args| + puts JSON.dump($client.chat_scheduledMessages_list(options)) + end + end +end diff --git a/bin/commands/conversations.rb b/bin/commands/conversations.rb index b307481f..279f3740 100644 --- a/bin/commands/conversations.rb +++ b/bin/commands/conversations.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc "Interface with all kinds of conversations the same way, whether they're public or private channels, direct messages, or otherwise." +desc 'Conversations methods.' command 'conversations' do |g| - g.desc 'Archives a conversation.' - g.long_desc %( Archives a conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'archive' do |c| c.flag 'channel', desc: 'ID of conversation to archive.' c.action do |_global_options, options, _args| @@ -11,8 +11,8 @@ end end - g.desc 'Closes a direct message or multi-person direct message.' - g.long_desc %( Closes a direct message or multi-person direct message. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'close' do |c| c.flag 'channel', desc: 'Conversation to close.' c.action do |_global_options, options, _args| @@ -20,8 +20,8 @@ end end - g.desc 'Initiates a public or private channel-based conversation' - g.long_desc %( Initiates a public or private channel-based conversation ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'create' do |c| c.flag 'name', desc: 'Name of the public or private channel to create.' c.flag 'is_private', desc: 'Create a private channel instead of a public one.' @@ -31,8 +31,8 @@ end end - g.desc "Fetches a conversation's history of messages and events." - g.long_desc %( Fetches a conversation's history of messages and events. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'history' do |c| c.flag 'channel', desc: 'Conversation ID to fetch history for.' 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." @@ -45,8 +45,8 @@ end end - g.desc 'Retrieve information about a conversation.' - g.long_desc %( Retrieve information about a conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'info' do |c| c.flag 'channel', desc: 'Conversation ID to learn more about.' c.flag 'include_locale', desc: 'Set this to true to receive the locale for this conversation. Defaults to false.' @@ -56,8 +56,8 @@ end end - g.desc 'Invites users to a channel.' - g.long_desc %( Invites users to a channel. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'invite' do |c| c.flag 'channel', desc: 'The ID of the public or private channel to invite user(s) to.' c.flag 'users', desc: 'A comma separated list of user IDs. Up to 30 users may be listed.' @@ -66,8 +66,8 @@ end end - g.desc 'Joins an existing conversation.' - g.long_desc %( Joins an existing conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'join' do |c| c.flag 'channel', desc: 'ID of conversation to join.' c.action do |_global_options, options, _args| @@ -75,8 +75,8 @@ end end - g.desc 'Removes a user from a conversation.' - g.long_desc %( Removes a user from a conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'kick' do |c| c.flag 'channel', desc: 'ID of conversation to remove user from.' c.flag 'user', desc: 'User ID to be removed.' @@ -85,8 +85,8 @@ end end - g.desc 'Leaves a conversation.' - g.long_desc %( Leaves a conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'leave' do |c| c.flag 'channel', desc: 'Conversation to leave.' c.action do |_global_options, options, _args| @@ -94,8 +94,8 @@ end end - g.desc 'Lists all channels in a Slack team.' - g.long_desc %( Lists all channels in a Slack team. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'list' do |c| 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." c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.' @@ -106,8 +106,8 @@ end end - g.desc 'Retrieve members of a conversation.' - g.long_desc %( Retrieve members of a conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'members' do |c| c.flag 'channel', desc: 'ID of the conversation to retrieve members for.' 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." @@ -117,8 +117,8 @@ end end - g.desc 'Opens or resumes a direct message or multi-person direct message.' - g.long_desc %( Opens or resumes a direct message or multi-person direct message. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'open' do |c| c.flag 'channel', desc: "Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead." c.flag 'return_im', desc: 'Boolean, indicates you want the full IM channel definition in the response.' @@ -128,8 +128,8 @@ end end - g.desc 'Renames a conversation.' - g.long_desc %( Renames a conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'rename' do |c| c.flag 'channel', desc: 'ID of conversation to rename.' c.flag 'name', desc: 'New name for conversation.' @@ -138,8 +138,8 @@ end end - g.desc 'Retrieve a thread of messages posted to a conversation' - g.long_desc %( Retrieve a thread of messages posted to a conversation ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'replies' do |c| c.flag 'channel', desc: 'Conversation ID to fetch thread from.' c.flag 'ts', desc: "Unique identifier of a thread's parent message." @@ -153,8 +153,8 @@ end end - g.desc 'Sets the purpose for a conversation.' - g.long_desc %( Sets the purpose for a conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'setPurpose' do |c| c.flag 'channel', desc: 'Conversation to set the purpose of.' c.flag 'purpose', desc: 'A new, specialer purpose.' @@ -163,8 +163,8 @@ end end - g.desc 'Sets the topic for a conversation.' - g.long_desc %( Sets the topic for a conversation. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'setTopic' do |c| c.flag 'channel', desc: 'Conversation to set the topic of.' c.flag 'topic', desc: 'The new topic string. Does not support formatting or linkification.' @@ -173,8 +173,8 @@ end end - g.desc 'Reverses conversation archival.' - g.long_desc %( Reverses conversation archival. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'unarchive' do |c| c.flag 'channel', desc: 'ID of conversation to unarchive.' c.action do |_global_options, options, _args| diff --git a/bin/commands/dialog.rb b/bin/commands/dialog.rb index 1da67ee3..a44afd15 100644 --- a/bin/commands/dialog.rb +++ b/bin/commands/dialog.rb @@ -2,8 +2,8 @@ desc 'Dialog methods.' command 'dialog' do |g| - g.desc 'Open a dialog with a user' - g.long_desc %( Open a dialog with a user ) + g.desc 'Open a dialog with a user by exchanging a trigger_id received from another interaction. See the dialogs documentation to learn how to obtain triggers define form elements.' + g.long_desc %( Open a dialog with a user by exchanging a trigger_id received from another interaction. See the dialogs documentation to learn how to obtain triggers define form elements. ) g.command 'open' do |c| c.flag 'dialog', desc: 'The dialog definition. This must be a JSON-encoded string.' c.flag 'trigger_id', desc: 'Exchange a trigger to post to the user.' diff --git a/bin/commands/dnd.rb b/bin/commands/dnd.rb index 18b0ad46..4d550a75 100644 --- a/bin/commands/dnd.rb +++ b/bin/commands/dnd.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc 'Adjust and view Do Not Disturb settings for team members.' +desc 'Dnd methods.' command 'dnd' do |g| - g.desc "Ends the current user's Do Not Disturb session immediately." - g.long_desc %( Ends the current user's Do Not Disturb session immediately. ) + g.desc "Ends the user's currently scheduled Do Not Disturb session immediately." + g.long_desc %( Ends the user's currently scheduled Do Not Disturb session immediately. ) g.command 'endDnd' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.dnd_endDnd(options)) @@ -18,8 +18,8 @@ end end - g.desc "Retrieves a user's current Do Not Disturb status." - g.long_desc %( Retrieves a user's current Do Not Disturb status. ) + g.desc "Provides information about a user's current Do Not Disturb settings." + g.long_desc %( Provides information about a user's current Do Not Disturb settings. ) g.command 'info' do |c| c.flag 'user', desc: 'User to fetch status for (defaults to current user).' c.action do |_global_options, options, _args| @@ -27,8 +27,8 @@ end end - g.desc 'Turns on Do Not Disturb mode for the current user, or changes its duration.' - g.long_desc %( Turns on Do Not Disturb mode for the current user, or changes its duration. ) + g.desc "Adjusts the snooze duration for a user's Do Not Disturb settings. If a snooze session is not already active for the user, invoking this method will begin one for the specified duration." + g.long_desc %( Adjusts the snooze duration for a user's Do Not Disturb settings. If a snooze session is not already active for the user, invoking this method will begin one for the specified duration. ) g.command 'setSnooze' do |c| c.flag 'num_minutes', desc: 'Number of minutes, from now, to snooze until.' c.action do |_global_options, options, _args| @@ -36,8 +36,8 @@ end end - g.desc 'Retrieves the Do Not Disturb status for users on a team.' - g.long_desc %( Retrieves the Do Not Disturb status for users on a team. ) + g.desc 'Provides information about the current Do Not Disturb settings for a list of users in a Slack team.' + g.long_desc %( Provides information about the current Do Not Disturb settings for a list of users in a Slack team. ) g.command 'teamInfo' do |c| c.flag 'users', desc: 'Comma-separated list of users to fetch Do Not Disturb status for.' c.action do |_global_options, options, _args| diff --git a/bin/commands/emoji.rb b/bin/commands/emoji.rb index 058c7a2e..f9be51b2 100644 --- a/bin/commands/emoji.rb +++ b/bin/commands/emoji.rb @@ -2,8 +2,8 @@ desc 'Emoji methods.' command 'emoji' do |g| - g.desc 'Lists custom emoji for a team.' - g.long_desc %( Lists custom emoji for a team. ) + g.desc 'This method lists the custom emoji for a team.' + g.long_desc %( This method lists the custom emoji for a team. ) g.command 'list' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.emoji_list(options)) diff --git a/bin/commands/files.rb b/bin/commands/files.rb index 3bfb0e90..7d80ab28 100644 --- a/bin/commands/files.rb +++ b/bin/commands/files.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc 'Get info on files uploaded to Slack, upload new files to Slack.' +desc 'Files methods.' command 'files' do |g| - g.desc 'Deletes a file.' - g.long_desc %( Deletes a file. ) + g.desc "A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments." + g.long_desc %( A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. ) g.command 'delete' do |c| c.flag 'file', desc: 'ID of file to delete.' c.action do |_global_options, options, _args| @@ -22,8 +22,8 @@ end end - g.desc 'Gets information about a team file.' - g.long_desc %( Gets information about a team file. ) + g.desc "A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments." + g.long_desc %( A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. ) g.command 'info' do |c| c.flag 'file', desc: 'Specify a file by providing its ID.' c.flag 'cursor', desc: "Parameter for pagination. File comments are paginated for a single file. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection of comments. See pagination for more details." @@ -33,32 +33,21 @@ end end - g.desc 'Lists & filters team files.' - g.long_desc %( Lists & filters team files. ) + g.desc "A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments." + g.long_desc %( A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. ) g.command 'list' do |c| c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.' c.flag 'ts_from', desc: 'Filter files created after this timestamp (inclusive).' c.flag 'ts_to', desc: 'Filter files created before this timestamp (inclusive).' - c.flag 'types', desc: 'Filter files by type: -* `all` - All files -* `spaces` - Posts -* `snippets` - Snippets -* `images` - Image files -* `gdocs` - Google docs -* `zips` - Zip files -* `pdfs` - PDF files - -You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list. - -.' + c.flag 'types', desc: 'Filter files by type (see below). You can pass multiple values in the types argument, like types=spaces,snippets.The default value is all, which does not filter the list.' c.flag 'user', desc: 'Filter files created by a single user.' c.action do |_global_options, options, _args| puts JSON.dump($client.files_list(options)) end end - g.desc 'Revokes public/external sharing access for a file' - g.long_desc %( Revokes public/external sharing access for a file ) + g.desc "A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments." + g.long_desc %( A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. ) g.command 'revokePublicURL' do |c| c.flag 'file', desc: 'File to revoke.' c.action do |_global_options, options, _args| @@ -76,8 +65,8 @@ end end - g.desc 'Enables a file for public/external sharing.' - g.long_desc %( Enables a file for public/external sharing. ) + g.desc "A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments." + g.long_desc %( A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. ) g.command 'sharedPublicURL' do |c| c.flag 'file', desc: 'File to share.' c.action do |_global_options, options, _args| @@ -85,8 +74,8 @@ end end - g.desc 'Uploads or creates a file.' - g.long_desc %( Uploads or creates a file. ) + g.desc "A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments." + g.long_desc %( A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. ) g.command 'upload' do |c| c.flag 'channels', desc: 'Comma-separated list of channel names or IDs where the file will be shared.' c.flag 'content', desc: 'File contents via a POST variable. If omitting this parameter, you must provide a file.' diff --git a/bin/commands/files_comments.rb b/bin/commands/files_comments.rb index dd17b31b..f7866f5c 100644 --- a/bin/commands/files_comments.rb +++ b/bin/commands/files_comments.rb @@ -2,18 +2,8 @@ desc 'FilesComments methods.' command 'files_comments' do |g| - g.desc 'Add a comment to an existing file.' - g.long_desc %( Add a comment to an existing file. ) - g.command 'add' do |c| - c.flag 'comment', desc: 'Text of the comment to add.' - c.flag 'file', desc: 'File to add a comment to.' - c.action do |_global_options, options, _args| - puts JSON.dump($client.files_comments_add(options)) - end - end - - g.desc 'Deletes an existing comment on a file.' - g.long_desc %( Deletes an existing comment on a file. ) + g.desc "A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments." + g.long_desc %( A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. ) g.command 'delete' do |c| c.flag 'file', desc: 'File to delete a comment from.' c.flag 'id', desc: 'The comment to delete.' @@ -21,15 +11,4 @@ puts JSON.dump($client.files_comments_delete(options)) end end - - g.desc 'Edit an existing file comment.' - g.long_desc %( Edit an existing file comment. ) - g.command 'edit' do |c| - c.flag 'comment', desc: 'Text of the comment to edit.' - c.flag 'file', desc: 'File containing the comment to edit.' - c.flag 'id', desc: 'The comment to edit.' - c.action do |_global_options, options, _args| - puts JSON.dump($client.files_comments_edit(options)) - end - end end diff --git a/bin/commands/groups.rb b/bin/commands/groups.rb index 691ab77b..1413f902 100644 --- a/bin/commands/groups.rb +++ b/bin/commands/groups.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc "Get info on your team's private channels." +desc 'Groups methods.' command 'groups' do |g| - g.desc 'Archives a private channel.' - g.long_desc %( Archives a private channel. ) + g.desc 'This method archives a private channel.' + g.long_desc %( This method archives a private channel. ) g.command 'archive' do |c| c.flag 'channel', desc: 'Private channel to archive.' c.action do |_global_options, options, _args| @@ -11,8 +11,8 @@ end end - g.desc 'Creates a private channel.' - g.long_desc %( Creates a private channel. ) + g.desc 'This method creates a private channel.' + g.long_desc %( This method creates a private channel. ) g.command 'create' do |c| c.flag 'name', desc: 'Name of private channel to create.' c.flag 'validate', desc: 'Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.' @@ -21,8 +21,8 @@ end end - g.desc 'Clones and archives a private channel.' - g.long_desc %( Clones and archives a private channel. ) + g.desc 'This method takes an existing private channel and performs the following steps:' + g.long_desc %( This method takes an existing private channel and performs the following steps: ) g.command 'createChild' do |c| c.flag 'channel', desc: 'Private channel to clone and archive.' c.action do |_global_options, options, _args| @@ -30,8 +30,8 @@ end end - g.desc 'Fetches history of messages and events from a private channel.' - g.long_desc %( Fetches history of messages and events from a private channel. ) + g.desc 'This method returns a portion of messages/events from the specified private channel.' + g.long_desc %( This method returns a portion of messages/events from the specified private channel. To read the entire history for a private channel, call the method with no latest or oldest arguments, and then continue paging using the instructions below. ) g.command 'history' do |c| c.flag 'channel', desc: 'Private channel to fetch history for.' c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results.' @@ -52,8 +52,8 @@ end end - g.desc 'Gets information about a private channel.' - g.long_desc %( Gets information about a private channel. ) + g.desc "Don't use this method. Use conversations.info instead." + g.long_desc %( Don't use this method. Use conversations.info instead. ) g.command 'info' do |c| c.flag 'channel', desc: 'Private channel to get info on.' c.flag 'include_locale', desc: 'Set this to true to receive the locale for this group. Defaults to false.' @@ -62,8 +62,8 @@ end end - g.desc 'Invites a user to a private channel.' - g.long_desc %( Invites a user to a private channel. ) + g.desc 'This method is used to invite a user to a private channel. The calling user must be a member of the private channel.' + g.long_desc %( This method is used to invite a user to a private channel. The calling user must be a member of the private channel. ) g.command 'invite' do |c| c.flag 'channel', desc: 'Private channel to invite user to.' c.flag 'user', desc: 'User to invite.' @@ -72,8 +72,8 @@ end end - g.desc 'Removes a user from a private channel.' - g.long_desc %( Removes a user from a private channel. ) + g.desc 'This method allows a user to remove another member from a private channel.' + g.long_desc %( This method allows a user to remove another member from a private channel. ) g.command 'kick' do |c| c.flag 'channel', desc: 'Private channel to remove user from.' c.flag 'user', desc: 'User to remove from private channel.' @@ -82,8 +82,8 @@ end end - g.desc 'Leaves a private channel.' - g.long_desc %( Leaves a private channel. ) + g.desc 'This method is used to leave a private channel.' + g.long_desc %( This method is used to leave a private channel. ) g.command 'leave' do |c| c.flag 'channel', desc: 'Private channel to leave.' c.action do |_global_options, options, _args| @@ -91,8 +91,8 @@ end end - g.desc 'Lists private channels that the calling user has access to.' - g.long_desc %( Lists private channels that the calling user has access to. ) + g.desc "Don't use this method. Use conversations.list instead." + g.long_desc %( Don't use this method. Use conversations.list instead. ) g.command 'list' do |c| c.flag 'cursor', desc: "Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection. See pagination for more details." c.flag 'exclude_archived', desc: "Don't return archived private channels." @@ -103,8 +103,8 @@ end end - g.desc 'Sets the read cursor in a private channel.' - g.long_desc %( Sets the read cursor in a private channel. ) + g.desc 'This method moves the read cursor in a private channel.' + g.long_desc %( This method moves the read cursor in a private channel. ) g.command 'mark' do |c| c.flag 'channel', desc: 'Private channel to set reading cursor in.' c.flag 'ts', desc: 'Timestamp of the most recently seen message.' @@ -113,8 +113,8 @@ end end - g.desc 'Opens a private channel.' - g.long_desc %( Opens a private channel. ) + g.desc 'This method opens a private channel.' + g.long_desc %( This method opens a private channel. ) g.command 'open' do |c| c.flag 'channel', desc: 'Private channel to open.' c.action do |_global_options, options, _args| @@ -122,8 +122,8 @@ end end - g.desc 'Renames a private channel.' - g.long_desc %( Renames a private channel. ) + g.desc 'This method renames a private channel.' + g.long_desc %( This method renames a private channel. ) g.command 'rename' do |c| c.flag 'channel', desc: 'Private channel to rename.' c.flag 'name', desc: 'New name for private channel.' @@ -133,8 +133,8 @@ end end - g.desc 'Retrieve a thread of messages posted to a private channel' - g.long_desc %( Retrieve a thread of messages posted to a private channel ) + g.desc 'This method returns an entire thread (a message plus all the messages in reply to it).' + g.long_desc %( This method returns an entire thread (a message plus all the messages in reply to it). ) g.command 'replies' do |c| c.flag 'channel', desc: 'Private channel to fetch thread from.' c.flag 'thread_ts', desc: "Unique identifier of a thread's parent message." @@ -143,8 +143,8 @@ end end - g.desc 'Sets the purpose for a private channel.' - g.long_desc %( Sets the purpose for a private channel. ) + g.desc 'This method is used to change the purpose of a private channel. The calling user must be a member of the private channel.' + g.long_desc %( This method is used to change the purpose of a private channel. The calling user must be a member of the private channel. ) g.command 'setPurpose' do |c| c.flag 'channel', desc: 'Private channel to set the purpose of.' c.flag 'purpose', desc: 'The new purpose.' @@ -153,8 +153,8 @@ end end - g.desc 'Sets the topic for a private channel.' - g.long_desc %( Sets the topic for a private channel. ) + g.desc 'This method is used to change the topic of a private channel. The calling user must be a member of the private channel.' + g.long_desc %( This method is used to change the topic of a private channel. The calling user must be a member of the private channel. ) g.command 'setTopic' do |c| c.flag 'channel', desc: 'Private channel to set the topic of.' c.flag 'topic', desc: 'The new topic.' @@ -163,8 +163,8 @@ end end - g.desc 'Unarchives a private channel.' - g.long_desc %( Unarchives a private channel. ) + g.desc 'This method unarchives a private channel.' + g.long_desc %( This method unarchives a private channel. ) g.command 'unarchive' do |c| c.flag 'channel', desc: 'Private channel to unarchive.' c.action do |_global_options, options, _args| diff --git a/bin/commands/im.rb b/bin/commands/im.rb index 06487182..0c7cc554 100644 --- a/bin/commands/im.rb +++ b/bin/commands/im.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc 'Get info on your direct messages.' +desc 'Im methods.' command 'im' do |g| - g.desc 'Close a direct message channel.' - g.long_desc %( Close a direct message channel. ) + g.desc 'This method closes a direct message channel.' + g.long_desc %( This method closes a direct message channel. ) g.command 'close' do |c| c.flag 'channel', desc: 'Direct message channel to close.' c.action do |_global_options, options, _args| @@ -11,8 +11,8 @@ end end - g.desc 'Fetches history of messages and events from direct message channel.' - g.long_desc %( Fetches history of messages and events from direct message channel. ) + g.desc 'This method returns a portion of messages/events from the specified direct message channel.' + g.long_desc %( This method returns a portion of messages/events from the specified direct message channel. To read the entire history for a direct message channel, call the method with no latest or oldest arguments, and then continue paging using the instructions below. ) g.command 'history' do |c| c.flag 'channel', desc: 'Direct message channel to fetch history for.' c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results.' @@ -24,8 +24,8 @@ end end - g.desc 'Lists direct message channels for the calling user.' - g.long_desc %( Lists direct message channels for the calling user. ) + g.desc "Don't use this method. Use conversations.list instead." + g.long_desc %( Don't use this method. Use conversations.list instead. ) g.command 'list' do |c| 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." c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached." @@ -34,8 +34,8 @@ end end - g.desc 'Sets the read cursor in a direct message channel.' - g.long_desc %( Sets the read cursor in a direct message channel. ) + g.desc 'This method moves the read cursor in a direct message channel.' + g.long_desc %( This method moves the read cursor in a direct message channel. ) g.command 'mark' do |c| c.flag 'channel', desc: 'Direct message channel to set reading cursor in.' c.flag 'ts', desc: 'Timestamp of the most recently seen message.' @@ -44,8 +44,8 @@ end end - g.desc 'Opens a direct message channel.' - g.long_desc %( Opens a direct message channel. ) + g.desc 'This method opens a direct message channel with another member of your Slack team.' + g.long_desc %( This method opens a direct message channel with another member of your Slack team. ) g.command 'open' do |c| c.flag 'user', desc: 'User to open a direct message channel with.' c.flag 'include_locale', desc: 'Set this to true to receive the locale for this im. Defaults to false.' @@ -55,8 +55,8 @@ end end - g.desc 'Retrieve a thread of messages posted to a direct message conversation' - g.long_desc %( Retrieve a thread of messages posted to a direct message conversation ) + g.desc 'This method returns an entire thread (a message plus all the messages in reply to it).' + g.long_desc %( This method returns an entire thread (a message plus all the messages in reply to it). ) g.command 'replies' do |c| c.flag 'channel', desc: 'Direct message channel to fetch thread from.' c.flag 'thread_ts', desc: "Unique identifier of a thread's parent message." diff --git a/bin/commands/migration.rb b/bin/commands/migration.rb index f4262e07..8c834195 100644 --- a/bin/commands/migration.rb +++ b/bin/commands/migration.rb @@ -2,8 +2,8 @@ desc 'Migration methods.' command 'migration' do |g| - g.desc 'For Enterprise Grid workspaces, map local user IDs to global user IDs' - g.long_desc %( For Enterprise Grid workspaces, map local user IDs to global user IDs ) + g.desc 'Easily convert your vintage user IDs to Enterprise Grid-friendly global user IDs.' + g.long_desc %( Easily convert your vintage user IDs to Enterprise Grid-friendly global user IDs. ) g.command 'exchange' do |c| c.flag 'users', desc: 'A comma-separated list of user ids, up to 400 per request.' c.flag 'to_old', desc: 'Specify true to convert W global user IDs to workspace-specific U IDs. Defaults to false.' diff --git a/bin/commands/mpim.rb b/bin/commands/mpim.rb index 213f137a..85f89481 100644 --- a/bin/commands/mpim.rb +++ b/bin/commands/mpim.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc 'Get info on your multiparty direct messages.' +desc 'Mpim methods.' command 'mpim' do |g| - g.desc 'Closes a multiparty direct message channel.' - g.long_desc %( Closes a multiparty direct message channel. ) + g.desc 'This method closes a multiparty direct message channel.' + g.long_desc %( This method closes a multiparty direct message channel. ) g.command 'close' do |c| c.flag 'channel', desc: 'MPIM to close.' c.action do |_global_options, options, _args| @@ -11,8 +11,8 @@ end end - g.desc 'Fetches history of messages and events from a multiparty direct message.' - g.long_desc %( Fetches history of messages and events from a multiparty direct message. ) + g.desc 'This method returns a portion of messages/events from the specified multiparty direct message channel.' + g.long_desc %( This method returns a portion of messages/events from the specified multiparty direct message channel. To read the entire history for a multiparty direct message, call the method with no latest or oldest arguments, and then continue paging using the instructions below. ) g.command 'history' do |c| c.flag 'channel', desc: 'Multiparty direct message to fetch history for.' c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results.' @@ -24,8 +24,8 @@ end end - g.desc 'Lists multiparty direct message channels for the calling user.' - g.long_desc %( Lists multiparty direct message channels for the calling user. ) + g.desc "Don't use this method. Use conversations.list instead." + g.long_desc %( Don't use this method. Use conversations.list instead. ) g.command 'list' do |c| c.flag 'cursor', desc: "Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection. See pagination for more details." c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached." @@ -34,8 +34,8 @@ end end - g.desc 'Sets the read cursor in a multiparty direct message channel.' - g.long_desc %( Sets the read cursor in a multiparty direct message channel. ) + g.desc 'This method moves the read cursor in a multiparty direct message channel.' + g.long_desc %( This method moves the read cursor in a multiparty direct message channel. ) g.command 'mark' do |c| c.flag 'channel', desc: 'multiparty direct message channel to set reading cursor in.' c.flag 'ts', desc: 'Timestamp of the most recently seen message.' @@ -53,8 +53,8 @@ end end - g.desc 'Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message.' - g.long_desc %( Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message. ) + g.desc 'This method returns an entire thread (a message plus all the messages in reply to it).' + g.long_desc %( This method returns an entire thread (a message plus all the messages in reply to it). ) g.command 'replies' do |c| c.flag 'channel', desc: 'Multiparty direct message channel to fetch thread from.' c.flag 'thread_ts', desc: "Unique identifier of a thread's parent message." diff --git a/bin/commands/oauth.rb b/bin/commands/oauth.rb index 5f47fe4e..56ba958f 100644 --- a/bin/commands/oauth.rb +++ b/bin/commands/oauth.rb @@ -2,8 +2,8 @@ desc 'Oauth methods.' command 'oauth' do |g| - g.desc 'Exchanges a temporary OAuth verifier code for an access token.' - g.long_desc %( Exchanges a temporary OAuth verifier code for an access token. ) + g.desc 'This method allows you to exchange a temporary OAuth code for an API access token.' + g.long_desc %( This method allows you to exchange a temporary OAuth code for an API access token. ) g.command 'access' do |c| c.flag 'client_id', desc: 'Issued when you created your application.' c.flag 'client_secret', desc: 'Issued when you created your application.' @@ -15,8 +15,8 @@ end end - g.desc 'Exchanges a temporary OAuth verifier code for a workspace token.' - g.long_desc %( Exchanges a temporary OAuth verifier code for a workspace token. ) + g.desc 'This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months.' + g.long_desc %( This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. ) g.command 'token' do |c| c.flag 'client_id', desc: 'Issued when you created your application.' c.flag 'client_secret', desc: 'Issued when you created your application.' diff --git a/bin/commands/pins.rb b/bin/commands/pins.rb index 495e9797..409ac955 100644 --- a/bin/commands/pins.rb +++ b/bin/commands/pins.rb @@ -2,8 +2,8 @@ desc 'Pins methods.' command 'pins' do |g| - g.desc 'Pins an item to a channel.' - g.long_desc %( Pins an item to a channel. ) + g.desc 'This method pins an item (file, file comment, channel message, or group message) to a particular channel.' + g.long_desc %( This method pins an item (file, file comment, channel message, or group message) to a particular channel. The channel argument is required and one of file, file_comment, or timestamp must also be specified. ) g.command 'add' do |c| c.flag 'channel', desc: 'Channel to pin the item in.' c.flag 'file', desc: 'File to pin.' @@ -14,8 +14,8 @@ end end - g.desc 'Lists items pinned to a channel.' - g.long_desc %( Lists items pinned to a channel. ) + g.desc 'This method lists the items pinned to a channel.' + g.long_desc %( This method lists the items pinned to a channel. ) g.command 'list' do |c| c.flag 'channel', desc: 'Channel to get pinned items for.' c.action do |_global_options, options, _args| @@ -23,8 +23,8 @@ end end - g.desc 'Un-pins an item from a channel.' - g.long_desc %( Un-pins an item from a channel. ) + g.desc 'This method un-pins an item (file, file comment, channel message, or group message) from a channel.' + g.long_desc %( This method un-pins an item (file, file comment, channel message, or group message) from a channel. The channel argument is required and one of file, file_comment, or timestamp must also be specified. ) g.command 'remove' do |c| c.flag 'channel', desc: 'Channel where the item is pinned to.' c.flag 'file', desc: 'File to un-pin.' diff --git a/bin/commands/reactions.rb b/bin/commands/reactions.rb index 485efa7c..ebe3e5ec 100644 --- a/bin/commands/reactions.rb +++ b/bin/commands/reactions.rb @@ -2,8 +2,8 @@ desc 'Reactions methods.' command 'reactions' do |g| - g.desc 'Adds a reaction to an item.' - g.long_desc %( Adds a reaction to an item. ) + g.desc 'This method adds a reaction (emoji) to a message.' + g.long_desc %( This method adds a reaction (emoji) to a message. Now that file threads work the way you'd expect, the file and file_comment arguments are deprecated. Specify channel and timestamp instead. ) g.command 'add' do |c| c.flag 'name', desc: 'Reaction (emoji) name.' c.flag 'channel', desc: 'Channel where the message to add reaction to was posted.' @@ -15,8 +15,8 @@ end end - g.desc 'Gets reactions for an item.' - g.long_desc %( Gets reactions for an item. ) + g.desc 'This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message).' + g.long_desc %( This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message). ) g.command 'get' do |c| c.flag 'channel', desc: 'Channel where the message to get reactions for was posted.' c.flag 'file', desc: 'File to get reactions for.' @@ -28,8 +28,8 @@ end end - g.desc 'Lists reactions made by a user.' - g.long_desc %( Lists reactions made by a user. ) + g.desc 'This method returns a list of all items (file, file comment, channel message, group message, or direct message) reacted to by a user.' + g.long_desc %( This method returns a list of all items (file, file comment, channel message, group message, or direct message) reacted to by a user. ) g.command 'list' do |c| c.flag 'cursor', desc: "Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection. See pagination for more details." c.flag 'full', desc: 'If true always return the complete reaction list.' @@ -40,8 +40,8 @@ end end - g.desc 'Removes a reaction from an item.' - g.long_desc %( Removes a reaction from an item. ) + g.desc 'This method removes a reaction (emoji) from an item (file, file comment, channel message, group message, or direct message).' + g.long_desc %( This method removes a reaction (emoji) from an item (file, file comment, channel message, group message, or direct message). One of file, file_comment, or the combination of channel and timestamp must be specified. ) g.command 'remove' do |c| c.flag 'name', desc: 'Reaction (emoji) name.' c.flag 'channel', desc: 'Channel where the message to remove reaction from was posted.' diff --git a/bin/commands/reminders.rb b/bin/commands/reminders.rb index 2157d135..6b7adca8 100644 --- a/bin/commands/reminders.rb +++ b/bin/commands/reminders.rb @@ -2,8 +2,8 @@ desc 'Reminders methods.' command 'reminders' do |g| - g.desc 'Creates a reminder.' - g.long_desc %( Creates a reminder. ) + g.desc 'This method creates a reminder.' + g.long_desc %( This method creates a reminder. ) g.command 'add' do |c| c.flag 'text', desc: 'The content of the reminder.' c.flag 'time', desc: 'When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").' @@ -13,8 +13,8 @@ end end - g.desc 'Marks a reminder as complete.' - g.long_desc %( Marks a reminder as complete. ) + g.desc 'This method completes a reminder.' + g.long_desc %( This method completes a reminder. ) g.command 'complete' do |c| c.flag 'reminder', desc: 'The ID of the reminder to be marked as complete.' c.action do |_global_options, options, _args| @@ -22,8 +22,8 @@ end end - g.desc 'Deletes a reminder.' - g.long_desc %( Deletes a reminder. ) + g.desc 'This method deletes a reminder.' + g.long_desc %( This method deletes a reminder. ) g.command 'delete' do |c| c.flag 'reminder', desc: 'The ID of the reminder.' c.action do |_global_options, options, _args| @@ -31,8 +31,8 @@ end end - g.desc 'Gets information about a reminder.' - g.long_desc %( Gets information about a reminder. ) + g.desc 'This method returns information about a reminder.' + g.long_desc %( This method returns information about a reminder. ) g.command 'info' do |c| c.flag 'reminder', desc: 'The ID of the reminder.' c.action do |_global_options, options, _args| @@ -40,8 +40,8 @@ end end - g.desc 'Lists all reminders created by or for a given user.' - g.long_desc %( Lists all reminders created by or for a given user. ) + g.desc 'This method lists all reminders created by or for a given user.' + g.long_desc %( This method lists all reminders created by or for a given user. ) g.command 'list' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.reminders_list(options)) diff --git a/bin/commands/rtm.rb b/bin/commands/rtm.rb index 23d5981a..d75c1e6e 100644 --- a/bin/commands/rtm.rb +++ b/bin/commands/rtm.rb @@ -2,8 +2,8 @@ desc 'Rtm methods.' command 'rtm' do |g| - g.desc 'Starts a Real Time Messaging session.' - g.long_desc %( Starts a Real Time Messaging session. ) + g.desc 'This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket.' + g.long_desc %( This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket. ) g.command 'connect' do |c| c.flag 'batch_presence_aware', desc: 'Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.' c.flag 'presence_sub', desc: 'Only deliver presence events when requested by subscription. See presence subscriptions.' @@ -12,8 +12,8 @@ end end - g.desc 'Starts a Real Time Messaging session.' - g.long_desc %( Starts a Real Time Messaging session. ) + g.desc 'This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket.' + g.long_desc %( This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket. ) g.command 'start' do |c| c.flag 'batch_presence_aware', desc: 'Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.' c.flag 'include_locale', desc: 'Set this to true to receive the locale for users and channels. Defaults to false.' diff --git a/bin/commands/search.rb b/bin/commands/search.rb index ea3d0e7f..1b6c8037 100644 --- a/bin/commands/search.rb +++ b/bin/commands/search.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc "Search your team's files and messages." +desc 'Search methods.' command 'search' do |g| - g.desc 'Searches for messages and files matching a query.' - g.long_desc %( Searches for messages and files matching a query. ) + g.desc 'This method allows users and applications to search both messages and files in a single call.' + g.long_desc %( This method allows users and applications to search both messages and files in a single call. ) g.command 'all' do |c| c.flag 'query', desc: 'Search query. May contains booleans, etc.' c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).' @@ -14,8 +14,8 @@ end end - g.desc 'Searches for files matching a query.' - g.long_desc %( Searches for files matching a query. ) + g.desc 'This method returns files matching a search query.' + g.long_desc %( This method returns files matching a search query. ) g.command 'files' do |c| c.flag 'query', desc: 'Search query.' c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).' @@ -26,8 +26,8 @@ end end - g.desc 'Searches for messages matching a query.' - g.long_desc %( Searches for messages matching a query. ) + g.desc 'This method returns messages matching a search query.' + g.long_desc %( This method returns messages matching a search query. ) g.command 'messages' do |c| c.flag 'query', desc: 'Search query.' c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).' diff --git a/bin/commands/stars.rb b/bin/commands/stars.rb index 913af93e..3b833144 100644 --- a/bin/commands/stars.rb +++ b/bin/commands/stars.rb @@ -2,8 +2,8 @@ desc 'Stars methods.' command 'stars' do |g| - g.desc 'Adds a star to an item.' - g.long_desc %( Adds a star to an item. ) + g.desc 'This method adds a star to an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user.' + g.long_desc %( This method adds a star to an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user. One of file, file_comment, channel, or the combination of channel and timestamp must be specified. ) g.command 'add' do |c| c.flag 'channel', desc: 'Channel to add star to, or channel where the message to add star to was posted (used with timestamp).' c.flag 'file', desc: 'File to add star to.' @@ -14,8 +14,8 @@ end end - g.desc 'Lists stars for a user.' - g.long_desc %( Lists stars for a user. ) + g.desc 'This method lists the items starred by the authed user.' + g.long_desc %( This method lists the items starred by the authed user. ) g.command 'list' do |c| c.flag 'cursor', desc: "Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection. See pagination for more details." c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached." @@ -24,8 +24,8 @@ end end - g.desc 'Removes a star from an item.' - g.long_desc %( Removes a star from an item. ) + g.desc 'This method removes a star from an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user.' + g.long_desc %( This method removes a star from an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user. One of file, file_comment, channel, or the combination of channel and timestamp must be specified. ) g.command 'remove' do |c| c.flag 'channel', desc: 'Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp).' c.flag 'file', desc: 'File to remove star from.' diff --git a/bin/commands/team.rb b/bin/commands/team.rb index 62784c70..52ae2675 100644 --- a/bin/commands/team.rb +++ b/bin/commands/team.rb @@ -2,8 +2,8 @@ desc 'Team methods.' command 'team' do |g| - g.desc 'Gets the access logs for the current team.' - g.long_desc %( Gets the access logs for the current team. ) + g.desc 'This method is used to retrieve the "access logs" for users on a workspace.' + g.long_desc %( This method is used to retrieve the "access logs" for users on a workspace. ) g.command 'accessLogs' do |c| c.flag 'before', desc: 'End of time range of logs to include in results (inclusive).' c.action do |_global_options, options, _args| @@ -11,8 +11,8 @@ end end - g.desc 'Gets billable users information for the current team.' - g.long_desc %( Gets billable users information for the current team. ) + g.desc 'This method lists billable information for each user on the team. Currently this consists solely of whether the user is' + g.long_desc %( This method lists billable information for each user on the team. Currently this consists solely of whether the user is subject to billing per Slack's Fair Billing policy. ) g.command 'billableInfo' do |c| c.flag 'user', desc: 'A user to retrieve the billable information for. Defaults to all users.' c.action do |_global_options, options, _args| @@ -20,16 +20,16 @@ end end - g.desc 'Gets information about the current team.' - g.long_desc %( Gets information about the current team. ) + g.desc 'This method provides information about your team.' + g.long_desc %( This method provides information about your team. ) g.command 'info' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.team_info(options)) end end - g.desc 'Gets the integration logs for the current team.' - g.long_desc %( Gets the integration logs for the current team. ) + g.desc 'This method lists the integration activity logs for a team, including when integrations are added, modified and removed. This method can only be called by Admins.' + g.long_desc %( This method lists the integration activity logs for a team, including when integrations are added, modified and removed. This method can only be called by Admins. ) g.command 'integrationLogs' do |c| c.flag 'app_id', desc: 'Filter logs to this Slack app. Defaults to all logs.' c.flag 'change_type', desc: 'Filter logs with this change type. Defaults to all logs.' diff --git a/bin/commands/team_profile.rb b/bin/commands/team_profile.rb index e014c88a..40af3e92 100644 --- a/bin/commands/team_profile.rb +++ b/bin/commands/team_profile.rb @@ -2,8 +2,8 @@ desc 'TeamProfile methods.' command 'team_profile' do |g| - g.desc "Retrieve a team's profile." - g.long_desc %( Retrieve a team's profile. ) + g.desc 'This method is used to get the profile field definitions for this team.' + g.long_desc %( This method is used to get the profile field definitions for this team. ) g.command 'get' do |c| c.flag 'visibility', desc: 'Filter by visibility.' c.action do |_global_options, options, _args| diff --git a/bin/commands/usergroups.rb b/bin/commands/usergroups.rb index 697d60dc..85f0995c 100644 --- a/bin/commands/usergroups.rb +++ b/bin/commands/usergroups.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc "Get info on your team's User Groups." +desc 'Usergroups methods.' command 'usergroups' do |g| - g.desc 'Create a User Group' - g.long_desc %( Create a User Group ) + g.desc 'This method is used to create a User Group.' + g.long_desc %( This method is used to create a User Group. ) g.command 'create' do |c| c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.' c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.' @@ -15,8 +15,8 @@ end end - g.desc 'Disable an existing User Group' - g.long_desc %( Disable an existing User Group ) + g.desc 'This method disables an existing User Group.' + g.long_desc %( This method disables an existing User Group. ) g.command 'disable' do |c| c.flag 'usergroup', desc: 'The encoded ID of the User Group to disable.' c.flag 'include_count', desc: 'Include the number of users in the User Group.' @@ -25,8 +25,8 @@ end end - g.desc 'Enable a User Group' - g.long_desc %( Enable a User Group ) + g.desc 'This method enables a User Group which was previously disabled.' + g.long_desc %( This method enables a User Group which was previously disabled. ) g.command 'enable' do |c| c.flag 'usergroup', desc: 'The encoded ID of the User Group to enable.' c.flag 'include_count', desc: 'Include the number of users in the User Group.' @@ -35,8 +35,8 @@ end end - g.desc 'List all User Groups for a team' - g.long_desc %( List all User Groups for a team ) + g.desc 'This method returns a list of all User Groups in the team. This can optionally include disabled User Groups.' + g.long_desc %( This method returns a list of all User Groups in the team. This can optionally include disabled User Groups. ) g.command 'list' do |c| c.flag 'include_count', desc: 'Include the number of users in each User Group.' c.flag 'include_disabled', desc: 'Include disabled User Groups.' @@ -46,8 +46,8 @@ end end - g.desc 'Update an existing User Group' - g.long_desc %( Update an existing User Group ) + g.desc 'This method updates the properties of an existing User Group.' + g.long_desc %( This method updates the properties of an existing User Group. ) g.command 'update' do |c| c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.' c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.' diff --git a/bin/commands/usergroups_users.rb b/bin/commands/usergroups_users.rb index 3b152672..51b90c2e 100644 --- a/bin/commands/usergroups_users.rb +++ b/bin/commands/usergroups_users.rb @@ -2,8 +2,8 @@ desc 'UsergroupsUsers methods.' command 'usergroups_users' do |g| - g.desc 'List all users in a User Group' - g.long_desc %( List all users in a User Group ) + g.desc 'This method returns a list of all users within a User Group.' + g.long_desc %( This method returns a list of all users within a User Group. ) g.command 'list' do |c| c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.' c.flag 'include_disabled', desc: 'Allow results that involve disabled User Groups.' @@ -12,8 +12,8 @@ end end - g.desc 'Update the list of users for a User Group' - g.long_desc %( Update the list of users for a User Group ) + g.desc 'This method updates the list of users that belong to a User Group. This method replaces all users in a User Group with the list of users provided in the users parameter.' + g.long_desc %( This method updates the list of users that belong to a User Group. This method replaces all users in a User Group with the list of users provided in the users parameter. ) g.command 'update' do |c| c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.' c.flag 'users', desc: 'A comma separated string of encoded user IDs that represent the entire list of users for the User Group.' diff --git a/bin/commands/users.rb b/bin/commands/users.rb index 22495bc4..c1e338ae 100644 --- a/bin/commands/users.rb +++ b/bin/commands/users.rb @@ -1,9 +1,9 @@ # This file was auto-generated by lib/tasks/web.rake -desc 'Get info on members of your Slack team.' +desc 'Users methods.' command 'users' do |g| - g.desc 'List conversations the calling user may access.' - g.long_desc %( List conversations the calling user may access. ) + g.desc "As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed." + g.long_desc %( As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. ) g.command 'conversations' do |c| 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." c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.' @@ -15,16 +15,16 @@ end end - g.desc 'Delete the user profile photo' - g.long_desc %( Delete the user profile photo ) + g.desc 'This method allows the user to delete their profile image. It will clear whatever image is currently set.' + g.long_desc %( This method allows the user to delete their profile image. It will clear whatever image is currently set. ) g.command 'deletePhoto' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.users_deletePhoto(options)) end end - g.desc 'Gets user presence information.' - g.long_desc %( Gets user presence information. ) + g.desc "This method lets you find out information about a user's presence." + g.long_desc %( This method lets you find out information about a user's presence. Consult the presence documentation for more details. ) g.command 'getPresence' do |c| c.flag 'user', desc: 'User to get presence info on. Defaults to the authed user.' c.action do |_global_options, options, _args| @@ -41,16 +41,16 @@ end end - g.desc "Get a user's identity." - g.long_desc %( Get a user's identity. ) + g.desc "After your Slack app is awarded an identity token through Sign in with Slack, use this method to retrieve a user's identity." + g.long_desc %( After your Slack app is awarded an identity token through Sign in with Slack, use this method to retrieve a user's identity. ) g.command 'identity' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.users_identity(options)) end end - g.desc 'Gets information about a user.' - g.long_desc %( Gets information about a user. ) + g.desc 'This method returns information about a member of a workspace.' + g.long_desc %( This method returns information about a member of a workspace. ) g.command 'info' do |c| c.flag 'user', desc: 'User to get info on.' c.flag 'include_locale', desc: 'Set this to true to receive the locale for this user. Defaults to false.' @@ -59,20 +59,19 @@ end end - g.desc 'Lists all users in a Slack team.' - g.long_desc %( Lists all users in a Slack team. ) + g.desc 'This method returns a list of all users in the workspace. This includes deleted/deactivated users.' + g.long_desc %( This method returns a list of all users in the workspace. This includes deleted/deactivated users. ) g.command 'list' do |c| 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." c.flag 'include_locale', desc: 'Set this to true to receive the locale for users. Defaults to false.' c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached." - c.flag 'presence', desc: 'Deprecated. Whether to include presence data in the output. Defaults to false. Setting this to true reduces performance, especially with large teams.' c.action do |_global_options, options, _args| puts JSON.dump($client.users_list(options)) end end - g.desc 'Find a user with an email address.' - g.long_desc %( Find a user with an email address. ) + g.desc 'Retrieve a single user by looking them up by their registered email address. Requires users:read.email.' + g.long_desc %( Retrieve a single user by looking them up by their registered email address. Requires users:read.email. ) g.command 'lookupByEmail' do |c| c.flag 'email', desc: 'An email address belonging to a user in the workspace.' c.action do |_global_options, options, _args| @@ -89,16 +88,16 @@ end end - g.desc 'Marked a user as active. Deprecated and non-functional.' - g.long_desc %( Marked a user as active. Deprecated and non-functional. ) + g.desc 'This method is no longer functional and the behavior it controlled is no longer offered. The method will no longer exist beginning May 8, 2018.' + g.long_desc %( This method is no longer functional and the behavior it controlled is no longer offered. The method will no longer exist beginning May 8, 2018. ) g.command 'setActive' do |c| c.action do |_global_options, options, _args| puts JSON.dump($client.users_setActive(options)) end end - g.desc 'Set the user profile photo' - g.long_desc %( Set the user profile photo ) + g.desc 'This method allows the user to set their profile image. The caller can pass image data via image.' + g.long_desc %( This method allows the user to set their profile image. The caller can pass image data via image. ) g.command 'setPhoto' do |c| c.flag 'image', desc: 'File contents via multipart/form-data.' c.flag 'crop_w', desc: 'Width/height of crop box (always square).' @@ -109,8 +108,8 @@ end end - g.desc 'Manually sets user presence.' - g.long_desc %( Manually sets user presence. ) + g.desc "This method lets you set the calling user's manual presence." + g.long_desc %( This method lets you set the calling user's manual presence. Consult the presence documentation for more details. ) g.command 'setPresence' do |c| c.flag 'presence', desc: 'Either auto or away.' c.action do |_global_options, options, _args| diff --git a/bin/commands/users_profile.rb b/bin/commands/users_profile.rb index f6eeecef..91bd137e 100644 --- a/bin/commands/users_profile.rb +++ b/bin/commands/users_profile.rb @@ -2,8 +2,8 @@ desc 'UsersProfile methods.' command 'users_profile' do |g| - g.desc "Retrieves a user's profile information." - g.long_desc %( Retrieves a user's profile information. ) + g.desc "Use this method to retrieve a user's profile information." + g.long_desc %( Use this method to retrieve a user's profile information. ) g.command 'get' do |c| c.flag 'include_labels', desc: 'Include labels for each ID in custom profile fields.' c.flag 'user', desc: 'User to retrieve profile info for.' @@ -12,8 +12,8 @@ end end - g.desc 'Set the profile information for a user.' - g.long_desc %( Set the profile information for a user. ) + g.desc "Use this method to set a user's profile information, including name, email, current status, and other attributes." + g.long_desc %( Use this method to set a user's profile information, including name, email, current status, and other attributes. ) g.command 'set' do |c| c.flag 'name', desc: 'Name of a single key to set. Usable only if profile is not passed.' c.flag 'profile', desc: 'Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.' diff --git a/lib/slack/web/api/endpoints.rb b/lib/slack/web/api/endpoints.rb index 973f6a9b..722639f8 100644 --- a/lib/slack/web/api/endpoints.rb +++ b/lib/slack/web/api/endpoints.rb @@ -10,6 +10,7 @@ require_relative 'endpoints/bots' require_relative 'endpoints/channels' require_relative 'endpoints/chat' +require_relative 'endpoints/chat_scheduledMessages' require_relative 'endpoints/conversations' require_relative 'endpoints/dialog' require_relative 'endpoints/dnd' @@ -54,6 +55,7 @@ module Endpoints include Bots include Channels include Chat + include ChatScheduledmessages include Conversations include Dialog include Dnd diff --git a/lib/slack/web/api/endpoints/api.rb b/lib/slack/web/api/endpoints/api.rb index 2184729b..08ce64c0 100644 --- a/lib/slack/web/api/endpoints/api.rb +++ b/lib/slack/web/api/endpoints/api.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Api # - # Checks API calling code. + # This method helps you test your calling code. # # @option options [Object] :error # Error response to return. diff --git a/lib/slack/web/api/endpoints/apps.rb b/lib/slack/web/api/endpoints/apps.rb index 0c670b6c..3575ca9f 100644 --- a/lib/slack/web/api/endpoints/apps.rb +++ b/lib/slack/web/api/endpoints/apps.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Apps # - # Uninstalls your app from a workspace. + # This method uninstalls a workspace app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of a workspace app. # # @option options [Object] :client_id # Issued when you created your application. diff --git a/lib/slack/web/api/endpoints/apps_permissions.rb b/lib/slack/web/api/endpoints/apps_permissions.rb index b8b72dc7..63955f66 100644 --- a/lib/slack/web/api/endpoints/apps_permissions.rb +++ b/lib/slack/web/api/endpoints/apps_permissions.rb @@ -6,7 +6,7 @@ module Api module Endpoints module AppsPermissions # - # Returns list of permissions this app has on a team. + # This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. # # @see https://api.slack.com/methods/apps.permissions.info # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.permissions/apps.permissions.info.json @@ -15,7 +15,7 @@ def apps_permissions_info(options = {}) end # - # Allows an app to request additional scopes + # This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. # # @option options [Object] :scopes # A comma separated list of scopes to request for. diff --git a/lib/slack/web/api/endpoints/apps_permissions_resources.rb b/lib/slack/web/api/endpoints/apps_permissions_resources.rb index 58077a66..9bc3c5d2 100644 --- a/lib/slack/web/api/endpoints/apps_permissions_resources.rb +++ b/lib/slack/web/api/endpoints/apps_permissions_resources.rb @@ -6,7 +6,7 @@ module Api module Endpoints module AppsPermissionsResources # - # Returns list of resource grants this app has on a team. + # This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. # # @option options [Object] :cursor # 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. diff --git a/lib/slack/web/api/endpoints/apps_permissions_scopes.rb b/lib/slack/web/api/endpoints/apps_permissions_scopes.rb index 9808aa0e..6be33e35 100644 --- a/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +++ b/lib/slack/web/api/endpoints/apps_permissions_scopes.rb @@ -6,7 +6,7 @@ module Api module Endpoints module AppsPermissionsScopes # - # Returns list of scopes this app has on a team. + # This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. # # @see https://api.slack.com/methods/apps.permissions.scopes.list # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.permissions.scopes/apps.permissions.scopes.list.json diff --git a/lib/slack/web/api/endpoints/apps_permissions_users.rb b/lib/slack/web/api/endpoints/apps_permissions_users.rb index 20482ac0..17dca4f5 100644 --- a/lib/slack/web/api/endpoints/apps_permissions_users.rb +++ b/lib/slack/web/api/endpoints/apps_permissions_users.rb @@ -6,7 +6,7 @@ module Api module Endpoints module AppsPermissionsUsers # - # Returns list of user grants and corresponding scopes this app has on a team. + # This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. # # @option options [Object] :cursor # 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. @@ -25,7 +25,7 @@ def apps_permissions_users_list(options = {}) end # - # Enables an app to trigger a permissions modal to grant an app access to a user access scope. + # This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. # # @option options [Object] :scopes # A comma separated list of user scopes to request for. diff --git a/lib/slack/web/api/endpoints/auth.rb b/lib/slack/web/api/endpoints/auth.rb index c70b71e6..61d0b794 100644 --- a/lib/slack/web/api/endpoints/auth.rb +++ b/lib/slack/web/api/endpoints/auth.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Auth # - # Revokes a token. + # This method revokes an access token. Use it when you no longer need a token. For example, with a Sign In With Slack app, call this to log a user out. # # @option options [Object] :test # Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked. @@ -17,7 +17,7 @@ def auth_revoke(options = {}) end # - # Checks authentication & identity. + # This method checks authentication and tells "you" who you are, even if you might be a bot. # # @see https://api.slack.com/methods/auth.test # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/auth/auth.test.json diff --git a/lib/slack/web/api/endpoints/bots.rb b/lib/slack/web/api/endpoints/bots.rb index 10de46b3..15418935 100644 --- a/lib/slack/web/api/endpoints/bots.rb +++ b/lib/slack/web/api/endpoints/bots.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Bots # - # Gets information about a bot user. + # This method returns extended information about a bot user. # # @option options [Object] :bot # Bot user to get info on. diff --git a/lib/slack/web/api/endpoints/channels.rb b/lib/slack/web/api/endpoints/channels.rb index 507e8740..14f58358 100644 --- a/lib/slack/web/api/endpoints/channels.rb +++ b/lib/slack/web/api/endpoints/channels.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Channels # - # Archives a channel. + # This method archives a channel. # # @option options [channel] :channel # Channel to archive. @@ -19,7 +19,7 @@ def channels_archive(options = {}) end # - # Creates a channel. + # This method is used to create a channel. # # @option options [Object] :name # Name of channel to create. @@ -46,7 +46,7 @@ def channels_delete(options = {}) end # - # Fetches history of messages and events from a channel. + # This method returns a portion of message events from the specified public channel. # # @option options [channel] :channel # Channel to fetch history for. @@ -67,7 +67,7 @@ def channels_history(options = {}) end # - # Gets information about a channel. + # This method returns information about a team channel. # # @option options [channel] :channel # Channel to get info on. @@ -82,7 +82,7 @@ def channels_info(options = {}) end # - # Invites a user to a channel. + # This method is used to invite a user to a channel. The calling user must be a member of the channel. # # @option options [channel] :channel # Channel to invite user to. @@ -99,7 +99,8 @@ def channels_invite(options = {}) end # - # Joins a channel, creating it if needed. + # This method is used to join a channel. If the channel does not exist, it is + # created. # # @option options [Object] :name # Name of channel to join. @@ -113,7 +114,7 @@ def channels_join(options = {}) end # - # Removes a user from a channel. + # This method allows a user to remove another member from a team channel. # # @option options [channel] :channel # Channel to remove user from. @@ -130,7 +131,7 @@ def channels_kick(options = {}) end # - # Leaves a channel. + # This method is used to leave a channel. # # @option options [channel] :channel # Channel to leave. @@ -143,7 +144,7 @@ def channels_leave(options = {}) end # - # Lists all channels in a Slack team. + # Don't use this method. Use conversations.list instead. # # @option options [Object] :cursor # 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. @@ -166,7 +167,7 @@ def channels_list(options = {}) end # - # Sets the read cursor in a channel. + # This method moves the read cursor in a channel. # # @option options [channel] :channel # Channel to set reading cursor in. @@ -182,7 +183,7 @@ def channels_mark(options = {}) end # - # Renames a channel. + # This method renames a team channel. # # @option options [channel] :channel # Channel to rename. @@ -200,7 +201,7 @@ def channels_rename(options = {}) end # - # Retrieve a thread of messages posted to a channel + # This method returns an entire thread (a message plus all the messages in reply to it). # # @option options [channel] :channel # Channel to fetch thread from. @@ -216,12 +217,14 @@ def channels_replies(options = {}) end # - # Sets the purpose for a channel. + # This method is used to change the purpose of a channel. The calling user must be a member of the channel. # # @option options [channel] :channel # Channel to set the purpose of. # @option options [Object] :purpose # The new purpose. + # @option options [Object] :name_tagging + # if it is true, treat this like a message and not an unescaped thing. # @see https://api.slack.com/methods/channels.setPurpose # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.setPurpose.json def channels_setPurpose(options = {}) @@ -232,7 +235,7 @@ def channels_setPurpose(options = {}) end # - # Sets the topic for a channel. + # This method is used to change the topic of a channel. The calling user must be a member of the channel. # # @option options [channel] :channel # Channel to set the topic of. @@ -248,7 +251,7 @@ def channels_setTopic(options = {}) end # - # Unarchives a channel. + # This method unarchives a channel. The calling user is added to the channel. # # @option options [channel] :channel # Channel to unarchive. diff --git a/lib/slack/web/api/endpoints/chat.rb b/lib/slack/web/api/endpoints/chat.rb index c535bb5b..c5cd50ab 100644 --- a/lib/slack/web/api/endpoints/chat.rb +++ b/lib/slack/web/api/endpoints/chat.rb @@ -24,7 +24,7 @@ def chat_command(options = {}) end # - # Deletes a message. + # This method deletes a message from a channel. # # @option options [channel] :channel # Channel containing the message to be deleted. @@ -42,7 +42,25 @@ def chat_delete(options = {}) end # - # Retrieve a permalink URL for a specific extant message + # This method deletes a pending scheduled message before it is sent. + # + # @option options [channel] :channel + # The channel the scheduled_message is posting to. + # @option options [Object] :scheduled_message_id + # scheduled_message_id returned from call to chat.scheduleMessage. + # @option options [Object] :as_user + # Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope. + # @see https://api.slack.com/methods/chat.deleteScheduledMessage + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.deleteScheduledMessage.json + def chat_deleteScheduledMessage(options = {}) + throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? + throw ArgumentError.new('Required arguments :scheduled_message_id missing') if options[:scheduled_message_id].nil? + options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] + post('chat.deleteScheduledMessage', options) + end + + # + # Easily exchange a message timestamp and a channel ID for a friendly HTTP-based permalink to that message. Handles message threads and all conversation types. # # @option options [channel] :channel # The ID of the conversation or channel containing the message. @@ -58,7 +76,7 @@ def chat_getPermalink(options = {}) end # - # Share a me message into a channel. + # This method sends a me message to a channel from the calling user. # # @option options [channel] :channel # Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. @@ -73,7 +91,7 @@ def chat_meMessage(options = {}) end # - # Sends an ephemeral message to a user in a channel. + # This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation. # # @option options [channel] :channel # Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. @@ -92,7 +110,7 @@ def chat_meMessage(options = {}) # @option options [Object] :parse # Change how messages are treated. Defaults to none. See below. # @option options [Object] :thread_ts - # Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead. + # Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread. # @see https://api.slack.com/methods/chat.postEphemeral # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postEphemeral.json def chat_postEphemeral(options = {}) @@ -116,7 +134,7 @@ def chat_postEphemeral(options = {}) end # - # Sends a message to a channel. + # This method posts a message to a public channel, private channel, or direct message/IM channel. # # @option options [channel] :channel # Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details. @@ -169,14 +187,50 @@ def chat_postMessage(options = {}) end # - # Provide custom unfurl behavior for user-posted URLs + # This method schedules a message for delivery to a public channel, private channel, or direct message/IM channel at a specified time in the future. + # + # @option options [channel] :channel + # Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details. + # @option options [Object] :post_at + # Unix EPOCH timestamp of time in future to send the message. + # @option options [Object] :text + # Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead. Provide no more than 40,000 characters or risk truncation. + # @option options [Object] :as_user + # Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. + # @option options [Object] :attachments + # A JSON-based array of structured attachments, presented as a URL-encoded string. + # @option options [Object] :blocks + # A JSON-based array of structured blocks, presented as a URL-encoded string. + # @option options [Object] :link_names + # Find and link channel names and usernames. + # @option options [Object] :parse + # Change how messages are treated. Defaults to none. See below. + # @option options [Object] :reply_broadcast + # Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false. + # @option options [Object] :thread_ts + # Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead. + # @option options [Object] :unfurl_links + # Pass true to enable unfurling of primarily text-based content. + # @option options [Object] :unfurl_media + # Pass false to disable unfurling of media content. + # @see https://api.slack.com/methods/chat.scheduleMessage + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.scheduleMessage.json + def chat_scheduleMessage(options = {}) + throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? + throw ArgumentError.new('Required arguments :post_at missing') if options[:post_at].nil? + throw ArgumentError.new('Required arguments :text missing') if options[:text].nil? + post('chat.scheduleMessage', options) + end + + # + # This method attaches Slack app unfurl behavior to a specified and relevant message. A user token is required as this method does not support bot user tokens. # # @option options [channel] :channel # Channel ID of the message. # @option options [timestamp] :ts # Timestamp of the message to add unfurl behavior to. # @option options [Object] :unfurls - # URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl message attachments. + # URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. # @option options [Object] :user_auth_message # Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. # @option options [Object] :user_auth_required @@ -194,7 +248,7 @@ def chat_unfurl(options = {}) end # - # Updates a message. + # This method updates a message in a channel. Though related to chat.postMessage, some parameters of chat.update are handled differently. # # @option options [channel] :channel # Channel containing the message to be updated. diff --git a/lib/slack/web/api/endpoints/chat_scheduledMessages.rb b/lib/slack/web/api/endpoints/chat_scheduledMessages.rb new file mode 100644 index 00000000..dc7deba2 --- /dev/null +++ b/lib/slack/web/api/endpoints/chat_scheduledMessages.rb @@ -0,0 +1,37 @@ +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module ChatScheduledmessages + # + # This method returns a list of pending scheduled messages. + # + # @option options [channel] :channel + # The channel of the scheduled messages. + # @option options [Object] :cursor + # For pagination purposes, this is the cursor value returned from a previous call to chat.scheduledmessages.list indicating where you want to start this call from. + # @option options [timestamp] :latest + # A UNIX timestamp of the latest value in the time range. + # @option options [Object] :limit + # Maximum number of original entries to return. + # @option options [timestamp] :oldest + # A UNIX timestamp of the oldest value in the time range. + # @see https://api.slack.com/methods/chat.scheduledMessages.list + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat.scheduledMessages/chat.scheduledMessages.list.json + def chat_scheduledMessages_list(options = {}) + options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] + if block_given? + Pagination::Cursor.new(self, :chat_scheduledMessages_list, options).each do |page| + yield page + end + else + post('chat.scheduledMessages.list', options) + end + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/conversations.rb b/lib/slack/web/api/endpoints/conversations.rb index d39d0a7f..261726f6 100644 --- a/lib/slack/web/api/endpoints/conversations.rb +++ b/lib/slack/web/api/endpoints/conversations.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Conversations # - # Archives a conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # ID of conversation to archive. @@ -19,7 +19,7 @@ def conversations_archive(options = {}) end # - # Closes a direct message or multi-person direct message. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # Conversation to close. @@ -32,7 +32,7 @@ def conversations_close(options = {}) end # - # Initiates a public or private channel-based conversation + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [Object] :name # Name of the public or private channel to create. @@ -48,7 +48,7 @@ def conversations_create(options = {}) end # - # Fetches a conversation's history of messages and events. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # Conversation ID to fetch history for. @@ -77,7 +77,7 @@ def conversations_history(options = {}) end # - # Retrieve information about a conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # Conversation ID to learn more about. @@ -94,7 +94,7 @@ def conversations_info(options = {}) end # - # Invites users to a channel. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # The ID of the public or private channel to invite user(s) to. @@ -110,7 +110,7 @@ def conversations_invite(options = {}) end # - # Joins an existing conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # ID of conversation to join. @@ -123,7 +123,7 @@ def conversations_join(options = {}) end # - # Removes a user from a conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # ID of conversation to remove user from. @@ -140,7 +140,7 @@ def conversations_kick(options = {}) end # - # Leaves a conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # Conversation to leave. @@ -153,7 +153,7 @@ def conversations_leave(options = {}) end # - # Lists all channels in a Slack team. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [Object] :cursor # 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. @@ -176,7 +176,7 @@ def conversations_list(options = {}) end # - # Retrieve members of a conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # ID of the conversation to retrieve members for. @@ -199,7 +199,7 @@ def conversations_members(options = {}) end # - # Opens or resumes a direct message or multi-person direct message. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead. @@ -215,7 +215,7 @@ def conversations_open(options = {}) end # - # Renames a conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # ID of conversation to rename. @@ -231,7 +231,7 @@ def conversations_rename(options = {}) end # - # Retrieve a thread of messages posted to a conversation + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # Conversation ID to fetch thread from. @@ -263,7 +263,7 @@ def conversations_replies(options = {}) end # - # Sets the purpose for a conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # Conversation to set the purpose of. @@ -279,7 +279,7 @@ def conversations_setPurpose(options = {}) end # - # Sets the topic for a conversation. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # Conversation to set the topic of. @@ -295,7 +295,7 @@ def conversations_setTopic(options = {}) end # - # Reverses conversation archival. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [channel] :channel # ID of conversation to unarchive. diff --git a/lib/slack/web/api/endpoints/dialog.rb b/lib/slack/web/api/endpoints/dialog.rb index 4bebf730..387f5785 100644 --- a/lib/slack/web/api/endpoints/dialog.rb +++ b/lib/slack/web/api/endpoints/dialog.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Dialog # - # Open a dialog with a user + # Open a dialog with a user by exchanging a trigger_id received from another interaction. See the dialogs documentation to learn how to obtain triggers define form elements. # # @option options [Object] :dialog # The dialog definition. This must be a JSON-encoded string. diff --git a/lib/slack/web/api/endpoints/dnd.rb b/lib/slack/web/api/endpoints/dnd.rb index 8ea6acaf..dc0d78f1 100644 --- a/lib/slack/web/api/endpoints/dnd.rb +++ b/lib/slack/web/api/endpoints/dnd.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Dnd # - # Ends the current user's Do Not Disturb session immediately. + # Ends the user's currently scheduled Do Not Disturb session immediately. # # @see https://api.slack.com/methods/dnd.endDnd # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.endDnd.json @@ -24,7 +24,7 @@ def dnd_endSnooze(options = {}) end # - # Retrieves a user's current Do Not Disturb status. + # Provides information about a user's current Do Not Disturb settings. # # @option options [user] :user # User to fetch status for (defaults to current user). @@ -36,7 +36,7 @@ def dnd_info(options = {}) end # - # Turns on Do Not Disturb mode for the current user, or changes its duration. + # Adjusts the snooze duration for a user's Do Not Disturb settings. If a snooze session is not already active for the user, invoking this method will begin one for the specified duration. # # @option options [Object] :num_minutes # Number of minutes, from now, to snooze until. @@ -48,7 +48,7 @@ def dnd_setSnooze(options = {}) end # - # Retrieves the Do Not Disturb status for users on a team. + # Provides information about the current Do Not Disturb settings for a list of users in a Slack team. # # @option options [Object] :users # Comma-separated list of users to fetch Do Not Disturb status for. diff --git a/lib/slack/web/api/endpoints/emoji.rb b/lib/slack/web/api/endpoints/emoji.rb index 0638264a..f129a25d 100644 --- a/lib/slack/web/api/endpoints/emoji.rb +++ b/lib/slack/web/api/endpoints/emoji.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Emoji # - # Lists custom emoji for a team. + # This method lists the custom emoji for a team. # # @see https://api.slack.com/methods/emoji.list # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/emoji/emoji.list.json diff --git a/lib/slack/web/api/endpoints/files.rb b/lib/slack/web/api/endpoints/files.rb index baee9103..91e4cc5e 100644 --- a/lib/slack/web/api/endpoints/files.rb +++ b/lib/slack/web/api/endpoints/files.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Files # - # Deletes a file. + # A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. # # @option options [file] :file # ID of file to delete. @@ -35,7 +35,7 @@ def files_edit(options = {}) end # - # Gets information about a team file. + # A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. # # @option options [file] :file # Specify a file by providing its ID. @@ -57,7 +57,7 @@ def files_info(options = {}) end # - # Lists & filters team files. + # A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. # # @option options [channel] :channel # Filter files appearing in a specific channel, indicated by its ID. @@ -66,18 +66,7 @@ def files_info(options = {}) # @option options [Object] :ts_to # Filter files created before this timestamp (inclusive). # @option options [Object] :types - # Filter files by type: - # * `all` - All files - # * `spaces` - Posts - # * `snippets` - Snippets - # * `images` - Image files - # * `gdocs` - Google docs - # * `zips` - Zip files - # * `pdfs` - PDF files - # - # You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list. - # - # . + # Filter files by type (see below). You can pass multiple values in the types argument, like types=spaces,snippets.The default value is all, which does not filter the list. # @option options [user] :user # Filter files created by a single user. # @see https://api.slack.com/methods/files.list @@ -89,7 +78,7 @@ def files_list(options = {}) end # - # Revokes public/external sharing access for a file + # A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. # # @option options [file] :file # File to revoke. @@ -117,7 +106,7 @@ def files_share(options = {}) end # - # Enables a file for public/external sharing. + # A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. # # @option options [file] :file # File to share. @@ -129,7 +118,7 @@ def files_sharedPublicURL(options = {}) end # - # Uploads or creates a file. + # A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. # # @option options [Object] :channels # Comma-separated list of channel names or IDs where the file will be shared. diff --git a/lib/slack/web/api/endpoints/files_comments.rb b/lib/slack/web/api/endpoints/files_comments.rb index 64b5d285..56665a20 100644 --- a/lib/slack/web/api/endpoints/files_comments.rb +++ b/lib/slack/web/api/endpoints/files_comments.rb @@ -6,22 +6,7 @@ module Api module Endpoints module FilesComments # - # Add a comment to an existing file. - # - # @option options [Object] :comment - # Text of the comment to add. - # @option options [file] :file - # File to add a comment to. - # @see https://api.slack.com/methods/files.comments.add - # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.add.json - def files_comments_add(options = {}) - throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil? - throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? - post('files.comments.add', options) - end - - # - # Deletes an existing comment on a file. + # A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments. # # @option options [file] :file # File to delete a comment from. @@ -34,24 +19,6 @@ def files_comments_delete(options = {}) throw ArgumentError.new('Required arguments :id missing') if options[:id].nil? post('files.comments.delete', options) end - - # - # Edit an existing file comment. - # - # @option options [Object] :comment - # Text of the comment to edit. - # @option options [file] :file - # File containing the comment to edit. - # @option options [Object] :id - # The comment to edit. - # @see https://api.slack.com/methods/files.comments.edit - # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.edit.json - def files_comments_edit(options = {}) - throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil? - throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? - throw ArgumentError.new('Required arguments :id missing') if options[:id].nil? - post('files.comments.edit', options) - end end end end diff --git a/lib/slack/web/api/endpoints/groups.rb b/lib/slack/web/api/endpoints/groups.rb index 2b11830b..6f0a43c9 100644 --- a/lib/slack/web/api/endpoints/groups.rb +++ b/lib/slack/web/api/endpoints/groups.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Groups # - # Archives a private channel. + # This method archives a private channel. # # @option options [group] :channel # Private channel to archive. @@ -19,7 +19,7 @@ def groups_archive(options = {}) end # - # Creates a private channel. + # This method creates a private channel. # # @option options [Object] :name # Name of private channel to create. @@ -33,7 +33,7 @@ def groups_create(options = {}) end # - # Clones and archives a private channel. + # This method takes an existing private channel and performs the following steps: # # @option options [group] :channel # Private channel to clone and archive. @@ -46,7 +46,9 @@ def groups_createChild(options = {}) end # - # Fetches history of messages and events from a private channel. + # This method returns a portion of messages/events from the specified private channel. + # To read the entire history for a private channel, call the method with no latest or + # oldest arguments, and then continue paging using the instructions below. # # @option options [group] :channel # Private channel to fetch history for. @@ -67,7 +69,7 @@ def groups_history(options = {}) end # - # Gets information about a private channel. + # Don't use this method. Use conversations.info instead. # # @option options [group] :channel # Private channel to get info on. @@ -82,7 +84,7 @@ def groups_info(options = {}) end # - # Invites a user to a private channel. + # This method is used to invite a user to a private channel. The calling user must be a member of the private channel. # # @option options [group] :channel # Private channel to invite user to. @@ -99,7 +101,7 @@ def groups_invite(options = {}) end # - # Removes a user from a private channel. + # This method allows a user to remove another member from a private channel. # # @option options [group] :channel # Private channel to remove user from. @@ -116,7 +118,7 @@ def groups_kick(options = {}) end # - # Leaves a private channel. + # This method is used to leave a private channel. # # @option options [group] :channel # Private channel to leave. @@ -129,7 +131,7 @@ def groups_leave(options = {}) end # - # Lists private channels that the calling user has access to. + # Don't use this method. Use conversations.list instead. # # @option options [Object] :cursor # Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details. @@ -152,7 +154,7 @@ def groups_list(options = {}) end # - # Sets the read cursor in a private channel. + # This method moves the read cursor in a private channel. # # @option options [group] :channel # Private channel to set reading cursor in. @@ -168,7 +170,7 @@ def groups_mark(options = {}) end # - # Opens a private channel. + # This method opens a private channel. # # @option options [group] :channel # Private channel to open. @@ -181,7 +183,7 @@ def groups_open(options = {}) end # - # Renames a private channel. + # This method renames a private channel. # # @option options [group] :channel # Private channel to rename. @@ -199,7 +201,7 @@ def groups_rename(options = {}) end # - # Retrieve a thread of messages posted to a private channel + # This method returns an entire thread (a message plus all the messages in reply to it). # # @option options [group] :channel # Private channel to fetch thread from. @@ -215,7 +217,7 @@ def groups_replies(options = {}) end # - # Sets the purpose for a private channel. + # This method is used to change the purpose of a private channel. The calling user must be a member of the private channel. # # @option options [group] :channel # Private channel to set the purpose of. @@ -231,7 +233,7 @@ def groups_setPurpose(options = {}) end # - # Sets the topic for a private channel. + # This method is used to change the topic of a private channel. The calling user must be a member of the private channel. # # @option options [group] :channel # Private channel to set the topic of. @@ -247,7 +249,7 @@ def groups_setTopic(options = {}) end # - # Unarchives a private channel. + # This method unarchives a private channel. # # @option options [group] :channel # Private channel to unarchive. diff --git a/lib/slack/web/api/endpoints/im.rb b/lib/slack/web/api/endpoints/im.rb index 89dddfc2..1e59c7a0 100644 --- a/lib/slack/web/api/endpoints/im.rb +++ b/lib/slack/web/api/endpoints/im.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Im # - # Close a direct message channel. + # This method closes a direct message channel. # # @option options [im] :channel # Direct message channel to close. @@ -19,7 +19,9 @@ def im_close(options = {}) end # - # Fetches history of messages and events from direct message channel. + # This method returns a portion of messages/events from the specified direct message channel. + # To read the entire history for a direct message channel, call the method with no latest or + # oldest arguments, and then continue paging using the instructions below. # # @option options [im] :channel # Direct message channel to fetch history for. @@ -40,7 +42,7 @@ def im_history(options = {}) end # - # Lists direct message channels for the calling user. + # Don't use this method. Use conversations.list instead. # # @option options [Object] :cursor # 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. @@ -59,7 +61,7 @@ def im_list(options = {}) end # - # Sets the read cursor in a direct message channel. + # This method moves the read cursor in a direct message channel. # # @option options [im] :channel # Direct message channel to set reading cursor in. @@ -75,7 +77,7 @@ def im_mark(options = {}) end # - # Opens a direct message channel. + # This method opens a direct message channel with another member of your Slack team. # # @option options [user] :user # User to open a direct message channel with. @@ -92,7 +94,7 @@ def im_open(options = {}) end # - # Retrieve a thread of messages posted to a direct message conversation + # This method returns an entire thread (a message plus all the messages in reply to it). # # @option options [im] :channel # Direct message channel to fetch thread from. diff --git a/lib/slack/web/api/endpoints/migration.rb b/lib/slack/web/api/endpoints/migration.rb index c5e67c05..612261a3 100644 --- a/lib/slack/web/api/endpoints/migration.rb +++ b/lib/slack/web/api/endpoints/migration.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Migration # - # For Enterprise Grid workspaces, map local user IDs to global user IDs + # Easily convert your vintage user IDs to Enterprise Grid-friendly global user IDs. # # @option options [Object] :users # A comma-separated list of user ids, up to 400 per request. diff --git a/lib/slack/web/api/endpoints/mpim.rb b/lib/slack/web/api/endpoints/mpim.rb index 2d115421..0f8818a2 100644 --- a/lib/slack/web/api/endpoints/mpim.rb +++ b/lib/slack/web/api/endpoints/mpim.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Mpim # - # Closes a multiparty direct message channel. + # This method closes a multiparty direct message channel. # # @option options [channel] :channel # MPIM to close. @@ -19,7 +19,9 @@ def mpim_close(options = {}) end # - # Fetches history of messages and events from a multiparty direct message. + # This method returns a portion of messages/events from the specified multiparty direct message channel. + # To read the entire history for a multiparty direct message, call the method with no latest or + # oldest arguments, and then continue paging using the instructions below. # # @option options [channel] :channel # Multiparty direct message to fetch history for. @@ -40,7 +42,7 @@ def mpim_history(options = {}) end # - # Lists multiparty direct message channels for the calling user. + # Don't use this method. Use conversations.list instead. # # @option options [Object] :cursor # Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details. @@ -59,7 +61,7 @@ def mpim_list(options = {}) end # - # Sets the read cursor in a multiparty direct message channel. + # This method moves the read cursor in a multiparty direct message channel. # # @option options [channel] :channel # multiparty direct message channel to set reading cursor in. @@ -87,7 +89,7 @@ def mpim_open(options = {}) end # - # Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message. + # This method returns an entire thread (a message plus all the messages in reply to it). # # @option options [channel] :channel # Multiparty direct message channel to fetch thread from. diff --git a/lib/slack/web/api/endpoints/oauth.rb b/lib/slack/web/api/endpoints/oauth.rb index 8cb87e4e..a8d61ed2 100644 --- a/lib/slack/web/api/endpoints/oauth.rb +++ b/lib/slack/web/api/endpoints/oauth.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Oauth # - # Exchanges a temporary OAuth verifier code for an access token. + # This method allows you to exchange a temporary OAuth code for an API access token. # # @option options [Object] :client_id # Issued when you created your application. @@ -28,7 +28,7 @@ def oauth_access(options = {}) end # - # Exchanges a temporary OAuth verifier code for a workspace token. + # This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months. # # @option options [Object] :client_id # Issued when you created your application. diff --git a/lib/slack/web/api/endpoints/pins.rb b/lib/slack/web/api/endpoints/pins.rb index 235677eb..d301b70d 100644 --- a/lib/slack/web/api/endpoints/pins.rb +++ b/lib/slack/web/api/endpoints/pins.rb @@ -6,7 +6,8 @@ module Api module Endpoints module Pins # - # Pins an item to a channel. + # This method pins an item (file, file comment, channel message, or group message) to a particular channel. + # The channel argument is required and one of file, file_comment, or timestamp must also be specified. # # @option options [channel] :channel # Channel to pin the item in. @@ -25,7 +26,7 @@ def pins_add(options = {}) end # - # Lists items pinned to a channel. + # This method lists the items pinned to a channel. # # @option options [channel] :channel # Channel to get pinned items for. @@ -38,7 +39,8 @@ def pins_list(options = {}) end # - # Un-pins an item from a channel. + # This method un-pins an item (file, file comment, channel message, or group message) from a channel. + # The channel argument is required and one of file, file_comment, or timestamp must also be specified. # # @option options [channel] :channel # Channel where the item is pinned to. diff --git a/lib/slack/web/api/endpoints/reactions.rb b/lib/slack/web/api/endpoints/reactions.rb index e3804108..f27a87cb 100644 --- a/lib/slack/web/api/endpoints/reactions.rb +++ b/lib/slack/web/api/endpoints/reactions.rb @@ -6,7 +6,8 @@ module Api module Endpoints module Reactions # - # Adds a reaction to an item. + # This method adds a reaction (emoji) to a message. + # Now that file threads work the way you'd expect, the file and file_comment arguments are deprecated. Specify channel and timestamp instead. # # @option options [Object] :name # Reaction (emoji) name. @@ -27,7 +28,7 @@ def reactions_add(options = {}) end # - # Gets reactions for an item. + # This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message). # # @option options [channel] :channel # Channel where the message to get reactions for was posted. @@ -47,7 +48,7 @@ def reactions_get(options = {}) end # - # Lists reactions made by a user. + # This method returns a list of all items (file, file comment, channel message, group message, or direct message) reacted to by a user. # # @option options [Object] :cursor # Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details. @@ -71,7 +72,8 @@ def reactions_list(options = {}) end # - # Removes a reaction from an item. + # This method removes a reaction (emoji) from an item (file, file comment, channel message, group message, or direct message). + # One of file, file_comment, or the combination of channel and timestamp must be specified. # # @option options [Object] :name # Reaction (emoji) name. diff --git a/lib/slack/web/api/endpoints/reminders.rb b/lib/slack/web/api/endpoints/reminders.rb index 1684e712..ff6878f7 100644 --- a/lib/slack/web/api/endpoints/reminders.rb +++ b/lib/slack/web/api/endpoints/reminders.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Reminders # - # Creates a reminder. + # This method creates a reminder. # # @option options [Object] :text # The content of the reminder. @@ -24,7 +24,7 @@ def reminders_add(options = {}) end # - # Marks a reminder as complete. + # This method completes a reminder. # # @option options [Object] :reminder # The ID of the reminder to be marked as complete. @@ -36,7 +36,7 @@ def reminders_complete(options = {}) end # - # Deletes a reminder. + # This method deletes a reminder. # # @option options [Object] :reminder # The ID of the reminder. @@ -48,7 +48,7 @@ def reminders_delete(options = {}) end # - # Gets information about a reminder. + # This method returns information about a reminder. # # @option options [Object] :reminder # The ID of the reminder. @@ -60,7 +60,7 @@ def reminders_info(options = {}) end # - # Lists all reminders created by or for a given user. + # This method lists all reminders created by or for a given user. # # @see https://api.slack.com/methods/reminders.list # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.list.json diff --git a/lib/slack/web/api/endpoints/rtm.rb b/lib/slack/web/api/endpoints/rtm.rb index a7d4c972..383c97a6 100644 --- a/lib/slack/web/api/endpoints/rtm.rb +++ b/lib/slack/web/api/endpoints/rtm.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Rtm # - # Starts a Real Time Messaging session. + # This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket. # # @option options [Object] :batch_presence_aware # Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence. @@ -19,7 +19,7 @@ def rtm_connect(options = {}) end # - # Starts a Real Time Messaging session. + # This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket. # # @option options [Object] :batch_presence_aware # Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence. diff --git a/lib/slack/web/api/endpoints/search.rb b/lib/slack/web/api/endpoints/search.rb index 6cfebcd2..d151f6eb 100644 --- a/lib/slack/web/api/endpoints/search.rb +++ b/lib/slack/web/api/endpoints/search.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Search # - # Searches for messages and files matching a query. + # This method allows users and applications to search both messages and files in a single call. # # @option options [Object] :query # Search query. May contains booleans, etc. @@ -24,7 +24,7 @@ def search_all(options = {}) end # - # Searches for files matching a query. + # This method returns files matching a search query. # # @option options [Object] :query # Search query. @@ -42,7 +42,7 @@ def search_files(options = {}) end # - # Searches for messages matching a query. + # This method returns messages matching a search query. # # @option options [Object] :query # Search query. diff --git a/lib/slack/web/api/endpoints/stars.rb b/lib/slack/web/api/endpoints/stars.rb index 462dab1e..4316673c 100644 --- a/lib/slack/web/api/endpoints/stars.rb +++ b/lib/slack/web/api/endpoints/stars.rb @@ -6,7 +6,8 @@ module Api module Endpoints module Stars # - # Adds a star to an item. + # This method adds a star to an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user. + # One of file, file_comment, channel, or the combination of channel and timestamp must be specified. # # @option options [channel] :channel # Channel to add star to, or channel where the message to add star to was posted (used with timestamp). @@ -24,7 +25,7 @@ def stars_add(options = {}) end # - # Lists stars for a user. + # This method lists the items starred by the authed user. # # @option options [Object] :cursor # Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details. @@ -43,7 +44,8 @@ def stars_list(options = {}) end # - # Removes a star from an item. + # This method removes a star from an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user. + # One of file, file_comment, channel, or the combination of channel and timestamp must be specified. # # @option options [channel] :channel # Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp). diff --git a/lib/slack/web/api/endpoints/team.rb b/lib/slack/web/api/endpoints/team.rb index 63598df9..64e57c29 100644 --- a/lib/slack/web/api/endpoints/team.rb +++ b/lib/slack/web/api/endpoints/team.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Team # - # Gets the access logs for the current team. + # This method is used to retrieve the "access logs" for users on a workspace. # # @option options [Object] :before # End of time range of logs to include in results (inclusive). @@ -17,7 +17,8 @@ def team_accessLogs(options = {}) end # - # Gets billable users information for the current team. + # This method lists billable information for each user on the team. Currently this consists solely of whether the user is + # subject to billing per Slack's Fair Billing policy. # # @option options [user] :user # A user to retrieve the billable information for. Defaults to all users. @@ -29,7 +30,7 @@ def team_billableInfo(options = {}) end # - # Gets information about the current team. + # This method provides information about your team. # # @see https://api.slack.com/methods/team.info # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team/team.info.json @@ -38,7 +39,7 @@ def team_info(options = {}) end # - # Gets the integration logs for the current team. + # This method lists the integration activity logs for a team, including when integrations are added, modified and removed. This method can only be called by Admins. # # @option options [Object] :app_id # Filter logs to this Slack app. Defaults to all logs. diff --git a/lib/slack/web/api/endpoints/team_profile.rb b/lib/slack/web/api/endpoints/team_profile.rb index 79d68837..f1e123a2 100644 --- a/lib/slack/web/api/endpoints/team_profile.rb +++ b/lib/slack/web/api/endpoints/team_profile.rb @@ -6,7 +6,7 @@ module Api module Endpoints module TeamProfile # - # Retrieve a team's profile. + # This method is used to get the profile field definitions for this team. # # @option options [Object] :visibility # Filter by visibility. diff --git a/lib/slack/web/api/endpoints/usergroups.rb b/lib/slack/web/api/endpoints/usergroups.rb index d56f1f2a..9818b529 100644 --- a/lib/slack/web/api/endpoints/usergroups.rb +++ b/lib/slack/web/api/endpoints/usergroups.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Usergroups # - # Create a User Group + # This method is used to create a User Group. # # @option options [Object] :name # A name for the User Group. Must be unique among User Groups. @@ -26,7 +26,7 @@ def usergroups_create(options = {}) end # - # Disable an existing User Group + # This method disables an existing User Group. # # @option options [Object] :usergroup # The encoded ID of the User Group to disable. @@ -40,7 +40,7 @@ def usergroups_disable(options = {}) end # - # Enable a User Group + # This method enables a User Group which was previously disabled. # # @option options [Object] :usergroup # The encoded ID of the User Group to enable. @@ -54,7 +54,7 @@ def usergroups_enable(options = {}) end # - # List all User Groups for a team + # This method returns a list of all User Groups in the team. This can optionally include disabled User Groups. # # @option options [Object] :include_count # Include the number of users in each User Group. @@ -69,7 +69,7 @@ def usergroups_list(options = {}) end # - # Update an existing User Group + # This method updates the properties of an existing User Group. # # @option options [Object] :usergroup # The encoded ID of the User Group to update. diff --git a/lib/slack/web/api/endpoints/usergroups_users.rb b/lib/slack/web/api/endpoints/usergroups_users.rb index 4b40293f..938560e5 100644 --- a/lib/slack/web/api/endpoints/usergroups_users.rb +++ b/lib/slack/web/api/endpoints/usergroups_users.rb @@ -6,7 +6,7 @@ module Api module Endpoints module UsergroupsUsers # - # List all users in a User Group + # This method returns a list of all users within a User Group. # # @option options [Object] :usergroup # The encoded ID of the User Group to update. @@ -20,7 +20,7 @@ def usergroups_users_list(options = {}) end # - # Update the list of users for a User Group + # This method updates the list of users that belong to a User Group. This method replaces all users in a User Group with the list of users provided in the users parameter. # # @option options [Object] :usergroup # The encoded ID of the User Group to update. diff --git a/lib/slack/web/api/endpoints/users.rb b/lib/slack/web/api/endpoints/users.rb index 3ef85dd4..b3d9c1b5 100644 --- a/lib/slack/web/api/endpoints/users.rb +++ b/lib/slack/web/api/endpoints/users.rb @@ -6,7 +6,7 @@ module Api module Endpoints module Users # - # List conversations the calling user may access. + # As part of the Conversations API, this method's required scopes depend on the type of channel-like object you're working with. For classic Slack apps, a corresponding channels: scope is required when working with public channels, groups: for private channels, also the same rules are applied for im: and mpim:. For workspace apps, a conversations: scope is all that's needed. # # @option options [Object] :cursor # 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. @@ -32,7 +32,7 @@ def users_conversations(options = {}) end # - # Delete the user profile photo + # This method allows the user to delete their profile image. It will clear whatever image is currently set. # # @see https://api.slack.com/methods/users.deletePhoto # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.deletePhoto.json @@ -41,7 +41,8 @@ def users_deletePhoto(options = {}) end # - # Gets user presence information. + # This method lets you find out information about a user's presence. + # Consult the presence documentation for more details. # # @option options [user] :user # User to get presence info on. Defaults to the authed user. @@ -54,7 +55,7 @@ def users_getPresence(options = {}) end # - # Get a user's identity. + # After your Slack app is awarded an identity token through Sign in with Slack, use this method to retrieve a user's identity. # # @see https://api.slack.com/methods/users.identity # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.identity.json @@ -63,7 +64,7 @@ def users_identity(options = {}) end # - # Gets information about a user. + # This method returns information about a member of a workspace. # # @option options [user] :user # User to get info on. @@ -78,7 +79,7 @@ def users_info(options = {}) end # - # Lists all users in a Slack team. + # This method returns a list of all users in the workspace. This includes deleted/deactivated users. # # @option options [Object] :cursor # 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. @@ -86,8 +87,6 @@ def users_info(options = {}) # Set this to true to receive the locale for users. Defaults to false. # @option options [Object] :limit # The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. - # @option options [Object] :presence - # Deprecated. Whether to include presence data in the output. Defaults to false. Setting this to true reduces performance, especially with large teams. # @see https://api.slack.com/methods/users.list # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.list.json def users_list(options = {}) @@ -101,7 +100,7 @@ def users_list(options = {}) end # - # Find a user with an email address. + # Retrieve a single user by looking them up by their registered email address. Requires users:read.email. # # @option options [Object] :email # An email address belonging to a user in the workspace. @@ -113,7 +112,7 @@ def users_lookupByEmail(options = {}) end # - # Marked a user as active. Deprecated and non-functional. + # This method is no longer functional and the behavior it controlled is no longer offered. The method will no longer exist beginning May 8, 2018. # # @see https://api.slack.com/methods/users.setActive # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.setActive.json @@ -122,7 +121,7 @@ def users_setActive(options = {}) end # - # Set the user profile photo + # This method allows the user to set their profile image. The caller can pass image data via image. # # @option options [Object] :image # File contents via multipart/form-data. @@ -140,7 +139,8 @@ def users_setPhoto(options = {}) end # - # Manually sets user presence. + # This method lets you set the calling user's manual presence. + # Consult the presence documentation for more details. # # @option options [Object] :presence # Either auto or away. diff --git a/lib/slack/web/api/endpoints/users_profile.rb b/lib/slack/web/api/endpoints/users_profile.rb index 7b11d5c0..2af01a20 100644 --- a/lib/slack/web/api/endpoints/users_profile.rb +++ b/lib/slack/web/api/endpoints/users_profile.rb @@ -6,7 +6,7 @@ module Api module Endpoints module UsersProfile # - # Retrieves a user's profile information. + # Use this method to retrieve a user's profile information. # # @option options [Object] :include_labels # Include labels for each ID in custom profile fields. @@ -20,7 +20,7 @@ def users_profile_get(options = {}) end # - # Set the profile information for a user. + # Use this method to set a user's profile information, including name, email, current status, and other attributes. # # @option options [Object] :name # Name of a single key to set. Usable only if profile is not passed. diff --git a/lib/slack/web/api/slack-api-ref b/lib/slack/web/api/slack-api-ref index 48210d2b..b25f1b9b 160000 --- a/lib/slack/web/api/slack-api-ref +++ b/lib/slack/web/api/slack-api-ref @@ -1 +1 @@ -Subproject commit 48210d2bc9c9d912324ddd9f8310942ffe3300ce +Subproject commit b25f1b9b368fa7f730cc3821a57051e697b07024 diff --git a/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb b/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb new file mode 100644 index 00000000..19b3c17a --- /dev/null +++ b/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb @@ -0,0 +1,7 @@ +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::ChatScheduledmessages do + let(:client) { Slack::Web::Client.new } +end diff --git a/spec/slack/web/api/endpoints/files_comments_spec.rb b/spec/slack/web/api/endpoints/files_comments_spec.rb index df89c382..d7c0b9bb 100644 --- a/spec/slack/web/api/endpoints/files_comments_spec.rb +++ b/spec/slack/web/api/endpoints/files_comments_spec.rb @@ -4,14 +4,6 @@ RSpec.describe Slack::Web::Api::Endpoints::FilesComments do let(:client) { Slack::Web::Client.new } - context 'files.comments_add' do - it 'requires comment' do - expect { client.files_comments_add(file: 'F1234467890') }.to raise_error ArgumentError, /Required arguments :comment missing/ - end - it 'requires file' do - expect { client.files_comments_add(comment: 'Everyone should take a moment to read this file.') }.to raise_error ArgumentError, /Required arguments :file missing/ - end - end context 'files.comments_delete' do it 'requires file' do expect { client.files_comments_delete(id: 'Fc1234567890') }.to raise_error ArgumentError, /Required arguments :file missing/ @@ -20,15 +12,4 @@ expect { client.files_comments_delete(file: 'F1234567890') }.to raise_error ArgumentError, /Required arguments :id missing/ end end - context 'files.comments_edit' do - it 'requires comment' do - expect { client.files_comments_edit(file: 'F1234567890', id: 'Fc1234567890') }.to raise_error ArgumentError, /Required arguments :comment missing/ - end - it 'requires file' do - expect { client.files_comments_edit(comment: 'Everyone should take a moment to read this file, seriously.', id: 'Fc1234567890') }.to raise_error ArgumentError, /Required arguments :file missing/ - end - it 'requires id' do - expect { client.files_comments_edit(comment: 'Everyone should take a moment to read this file, seriously.', file: 'F1234567890') }.to raise_error ArgumentError, /Required arguments :id missing/ - end - end end