slack-ruby-client 0.13.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +24 -5
- data/.rubocop_todo.yml +100 -54
- data/.travis.yml +4 -8
- data/CHANGELOG.md +118 -35
- data/CONTRIBUTING.md +17 -6
- data/Dangerfile +2 -0
- data/Gemfile +10 -5
- data/LICENSE.md +1 -1
- data/README.md +185 -48
- data/Rakefile +2 -1
- data/UPGRADING.md +30 -2
- data/bin/commands.rb +32 -0
- data/bin/commands/admin_analytics.rb +16 -0
- data/bin/commands/admin_apps.rb +40 -0
- data/bin/commands/admin_apps_approved.rb +17 -0
- data/bin/commands/admin_apps_requests.rb +16 -0
- data/bin/commands/admin_apps_restricted.rb +17 -0
- data/bin/commands/admin_barriers.rb +47 -0
- data/bin/commands/admin_conversations.rb +159 -0
- data/bin/commands/admin_conversations_ekm.rb +17 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +37 -0
- data/bin/commands/admin_conversations_whitelist.rb +37 -0
- data/bin/commands/admin_emoji.rb +54 -0
- data/bin/commands/admin_inviteRequests.rb +36 -0
- data/bin/commands/admin_inviteRequests_approved.rb +16 -0
- data/bin/commands/admin_inviteRequests_denied.rb +16 -0
- data/bin/commands/admin_teams.rb +27 -0
- data/bin/commands/admin_teams_admins.rb +16 -0
- data/bin/commands/admin_teams_owners.rb +16 -0
- data/bin/commands/admin_teams_settings.rb +64 -0
- data/bin/commands/admin_usergroups.rb +48 -0
- data/bin/commands/admin_users.rb +97 -0
- data/bin/commands/admin_users_session.rb +38 -0
- data/bin/commands/api.rb +1 -1
- data/bin/commands/apps.rb +15 -0
- data/bin/commands/apps_connections.rb +13 -0
- data/bin/commands/apps_event_authorizations.rb +16 -0
- data/bin/commands/apps_permissions.rb +1 -0
- data/bin/commands/apps_permissions_resources.rb +1 -0
- data/bin/commands/apps_permissions_scopes.rb +1 -0
- data/bin/commands/apps_permissions_users.rb +1 -0
- data/bin/commands/auth.rb +1 -0
- data/bin/commands/auth_teams.rb +16 -0
- data/bin/commands/bots.rb +2 -0
- data/bin/commands/calls.rb +52 -0
- data/bin/commands/calls_participants.rb +25 -0
- data/bin/commands/channels.rb +1 -153
- data/bin/commands/chat.rb +51 -10
- data/bin/commands/chat_scheduledMessages.rb +19 -0
- data/bin/commands/conversations.rb +16 -3
- data/bin/commands/dialog.rb +1 -0
- data/bin/commands/dnd.rb +5 -2
- data/bin/commands/emoji.rb +1 -0
- data/bin/commands/files.rb +8 -17
- data/bin/commands/files_comments.rb +1 -21
- data/bin/commands/files_remote.rb +78 -0
- data/bin/commands/groups.rb +1 -161
- data/bin/commands/im.rb +1 -62
- data/bin/commands/migration.rb +2 -0
- data/bin/commands/mpim.rb +1 -60
- data/bin/commands/oauth.rb +2 -1
- data/bin/commands/oauth_v2.rb +17 -0
- data/bin/commands/pins.rb +1 -4
- data/bin/commands/reactions.rb +3 -3
- data/bin/commands/reminders.rb +1 -0
- data/bin/commands/rtm.rb +1 -0
- data/bin/commands/search.rb +4 -0
- data/bin/commands/stars.rb +1 -0
- data/bin/commands/team.rb +5 -0
- data/bin/commands/team_profile.rb +1 -0
- data/bin/commands/usergroups.rb +6 -0
- data/bin/commands/usergroups_users.rb +3 -0
- data/bin/commands/users.rb +5 -3
- data/bin/commands/users_admin.rb +1 -0
- data/bin/commands/users_prefs.rb +1 -0
- data/bin/commands/users_profile.rb +6 -5
- data/bin/commands/views.rb +48 -0
- data/bin/commands/workflows.rb +38 -0
- data/bin/slack +2 -3
- data/examples/hi_real_time_and_web/Gemfile +1 -0
- data/examples/hi_real_time_and_web/hi.rb +7 -3
- data/examples/hi_real_time_async_async/Gemfile +1 -0
- data/examples/hi_real_time_async_async/hi.rb +6 -2
- data/examples/hi_web/Gemfile +1 -0
- data/examples/hi_web/hi.rb +1 -0
- data/examples/new_ticket/Gemfile +1 -0
- data/examples/new_ticket/new_ticket.rb +1 -0
- data/lib/slack-ruby-client.rb +10 -4
- data/lib/slack.rb +1 -0
- data/lib/slack/config.rb +1 -0
- data/lib/slack/events/config.rb +32 -0
- data/lib/slack/events/request.rb +70 -0
- data/lib/slack/logger.rb +6 -5
- data/lib/slack/messages/formatting.rb +1 -0
- data/lib/slack/messages/message.rb +1 -4
- data/lib/slack/real_time/api/message.rb +3 -1
- data/lib/slack/real_time/api/message_id.rb +1 -0
- data/lib/slack/real_time/api/ping.rb +5 -2
- data/lib/slack/real_time/api/typing.rb +3 -1
- data/lib/slack/real_time/client.rb +98 -28
- data/lib/slack/real_time/concurrency.rb +1 -2
- data/lib/slack/real_time/concurrency/async.rb +79 -6
- data/lib/slack/real_time/config.rb +6 -10
- data/lib/slack/real_time/models.rb +1 -0
- data/lib/slack/real_time/models/base.rb +1 -4
- data/lib/slack/real_time/models/bot.rb +1 -0
- data/lib/slack/real_time/models/channel.rb +1 -0
- data/lib/slack/real_time/models/group.rb +1 -0
- data/lib/slack/real_time/models/im.rb +1 -0
- data/lib/slack/real_time/models/team.rb +1 -0
- data/lib/slack/real_time/models/user.rb +1 -0
- data/lib/slack/real_time/socket.rb +44 -15
- data/lib/slack/real_time/stores.rb +1 -0
- data/lib/slack/real_time/stores/base.rb +4 -1
- data/lib/slack/real_time/stores/starter.rb +11 -0
- data/lib/slack/real_time/stores/store.rb +28 -25
- data/lib/slack/version.rb +2 -1
- data/lib/slack/web/api/endpoints.rb +64 -0
- data/lib/slack/web/api/endpoints/admin_analytics.rb +28 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +62 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +246 -0
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +61 -0
- data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +64 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +88 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +61 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_teams.rb +50 -0
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +99 -0
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +77 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +161 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +66 -0
- data/lib/slack/web/api/endpoints/api.rb +1 -2
- data/lib/slack/web/api/endpoints/apps.rb +27 -0
- data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
- data/lib/slack/web/api/endpoints/apps_permissions.rb +1 -0
- data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +1 -0
- data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +1 -0
- data/lib/slack/web/api/endpoints/apps_permissions_users.rb +1 -0
- data/lib/slack/web/api/endpoints/auth.rb +1 -0
- data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
- data/lib/slack/web/api/endpoints/bots.rb +3 -0
- data/lib/slack/web/api/endpoints/calls.rb +83 -0
- data/lib/slack/web/api/endpoints/calls_participants.rb +42 -0
- data/lib/slack/web/api/endpoints/channels.rb +2 -243
- data/lib/slack/web/api/endpoints/chat.rb +112 -21
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
- data/lib/slack/web/api/endpoints/conversations.rb +40 -19
- data/lib/slack/web/api/endpoints/dialog.rb +1 -0
- data/lib/slack/web/api/endpoints/dnd.rb +7 -1
- data/lib/slack/web/api/endpoints/emoji.rb +1 -0
- data/lib/slack/web/api/endpoints/files.rb +10 -17
- data/lib/slack/web/api/endpoints/files_comments.rb +1 -33
- data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
- data/lib/slack/web/api/endpoints/groups.rb +1 -253
- data/lib/slack/web/api/endpoints/im.rb +1 -101
- data/lib/slack/web/api/endpoints/migration.rb +3 -0
- data/lib/slack/web/api/endpoints/mpim.rb +1 -96
- data/lib/slack/web/api/endpoints/oauth.rb +2 -4
- data/lib/slack/web/api/endpoints/oauth_v2.rb +30 -0
- data/lib/slack/web/api/endpoints/pins.rb +4 -11
- data/lib/slack/web/api/endpoints/reactions.rb +10 -9
- data/lib/slack/web/api/endpoints/reminders.rb +1 -0
- data/lib/slack/web/api/endpoints/rtm.rb +1 -0
- data/lib/slack/web/api/endpoints/search.rb +7 -0
- data/lib/slack/web/api/endpoints/stars.rb +3 -2
- data/lib/slack/web/api/endpoints/team.rb +9 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +1 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +11 -0
- data/lib/slack/web/api/endpoints/usergroups_users.rb +5 -0
- data/lib/slack/web/api/endpoints/users.rb +8 -7
- data/lib/slack/web/api/endpoints/users_admin.rb +1 -0
- data/lib/slack/web/api/endpoints/users_prefs.rb +1 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +4 -3
- data/lib/slack/web/api/endpoints/views.rb +97 -0
- data/lib/slack/web/api/endpoints/workflows.rb +61 -0
- data/lib/slack/web/api/error.rb +1 -0
- data/lib/slack/web/api/errors.rb +848 -0
- data/lib/slack/web/api/errors/internal_error.rb +14 -0
- data/lib/slack/web/api/errors/slack_error.rb +14 -1
- data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -0
- data/lib/slack/web/api/mixins.rb +2 -0
- data/lib/slack/web/api/mixins/channels.id.rb +2 -3
- data/lib/slack/web/api/mixins/conversations.id.rb +25 -0
- data/lib/slack/web/api/mixins/groups.id.rb +2 -3
- data/lib/slack/web/api/mixins/ids.id.rb +3 -2
- data/lib/slack/web/api/mixins/users.id.rb +2 -3
- data/lib/slack/web/api/mixins/users.search.rb +1 -0
- data/lib/slack/web/api/patches/chat.1.patch +71 -0
- data/lib/slack/web/api/patches/views.1.view-json.patch +40 -0
- data/lib/slack/web/api/patches/views.1.views-published.patch +16 -0
- data/lib/slack/web/api/templates/command.erb +1 -0
- data/lib/slack/web/api/templates/commands.erb +1 -0
- data/lib/slack/web/api/templates/endpoints.erb +2 -0
- data/lib/slack/web/api/templates/errors.erb +20 -0
- data/lib/slack/web/api/templates/method.erb +5 -1
- data/lib/slack/web/api/templates/method_spec.erb +2 -1
- data/lib/slack/web/client.rb +2 -1
- data/lib/slack/web/config.rb +3 -0
- data/lib/slack/web/faraday/connection.rb +24 -20
- data/lib/slack/web/faraday/request.rb +1 -0
- data/lib/slack/web/faraday/response/raise_error.rb +21 -6
- data/lib/slack/web/faraday/response/wrap_error.rb +24 -0
- data/lib/slack/web/pagination/cursor.rb +6 -2
- data/lib/slack_ruby_client.rb +1 -0
- data/lib/tasks/git.rake +1 -0
- data/lib/tasks/real_time.rake +15 -5
- data/lib/tasks/update.rake +1 -0
- data/lib/tasks/web.rake +39 -10
- data/screenshots/create-app.png +0 -0
- data/slack-ruby-client.gemspec +8 -4
- data/spec/fixtures/slack/web/channels_info.yml +108 -15
- data/spec/fixtures/slack/web/{groups_info.yml → conversations_info.yml} +4 -4
- data/spec/fixtures/slack/web/conversations_setTopic.yml +69 -0
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +142 -0
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +208 -0
- data/spec/fixtures/slack/web/views_open_error.yml +76 -0
- data/spec/integration/integration_spec.rb +116 -49
- data/spec/slack/config_spec.rb +2 -0
- data/spec/slack/events/config_spec.rb +33 -0
- data/spec/slack/events/request_spec.rb +184 -0
- data/spec/slack/messages/formatting_spec.rb +25 -13
- data/spec/slack/real_time/api/message_spec.rb +6 -1
- data/spec/slack/real_time/api/ping_spec.rb +2 -0
- data/spec/slack/real_time/api/typing_spec.rb +5 -1
- data/spec/slack/real_time/client_spec.rb +228 -30
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +2 -0
- data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +10 -0
- data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +10 -0
- data/spec/slack/real_time/event_handlers/bot_spec.rb +2 -1
- data/spec/slack/real_time/event_handlers/channel_spec.rb +9 -6
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +2 -1
- data/spec/slack/real_time/event_handlers/group_spec.rb +5 -4
- data/spec/slack/real_time/event_handlers/im_spec.rb +4 -3
- data/spec/slack/real_time/event_handlers/team_spec.rb +3 -1
- data/spec/slack/real_time/event_handlers/user_spec.rb +1 -0
- data/spec/slack/real_time/rtm_connect_spec.rb +2 -1
- data/spec/slack/real_time/rtm_start_spec.rb +2 -1
- data/spec/slack/real_time/store_spec.rb +2 -1
- data/spec/slack/slack_spec.rb +37 -5
- data/spec/slack/version_spec.rb +2 -1
- data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +38 -0
- data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +32 -0
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +93 -0
- data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +37 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +18 -0
- data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +53 -0
- data/spec/slack/web/api/endpoints/admin_teams_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +37 -0
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +21 -0
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +67 -0
- data/spec/slack/web/api/endpoints/api_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_connections_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/apps_permissions_resources_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_permissions_scopes_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +3 -2
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +4 -3
- data/spec/slack/web/api/endpoints/apps_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/auth_teams_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/bots_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +24 -0
- data/spec/slack/web/api/endpoints/calls_spec.rb +31 -0
- data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/conversations_spec.rb +21 -12
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +5 -1
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +112 -36
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +12 -4
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +6 -1
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +95 -0
- data/spec/slack/web/api/endpoints/dnd_spec.rb +6 -0
- data/spec/slack/web/api/endpoints/emoji_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +3 -21
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +24 -0
- data/spec/slack/web/api/endpoints/files_spec.rb +5 -4
- data/spec/slack/web/api/endpoints/im_spec.rb +1 -31
- data/spec/slack/web/api/endpoints/migration_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/mpim_spec.rb +1 -31
- data/spec/slack/web/api/endpoints/oauth_spec.rb +4 -14
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/pins_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/reactions_spec.rb +8 -1
- data/spec/slack/web/api/endpoints/reminders_spec.rb +3 -2
- data/spec/slack/web/api/endpoints/rtm_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/search_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/stars_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/team_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +3 -2
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/workflows_spec.rb +26 -0
- data/spec/slack/web/api/error_spec.rb +4 -2
- data/spec/slack/web/api/errors/slack_error_spec.rb +26 -2
- data/spec/slack/web/api/mixins/channels_spec.rb +17 -7
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +21 -0
- data/spec/slack/web/api/mixins/conversations_spec.rb +43 -0
- data/spec/slack/web/api/mixins/groups_spec.rb +17 -7
- data/spec/slack/web/api/mixins/users_spec.rb +17 -8
- data/spec/slack/web/api/pagination/cursor_spec.rb +40 -10
- data/spec/slack/web/client_spec.rb +166 -18
- data/spec/slack/web/faraday/response/raise_error_spec.rb +47 -12
- data/spec/spec_helper.rb +8 -1
- data/spec/support/queue_with_timeout.rb +5 -4
- data/spec/support/real_time/concurrency/mock.rb +1 -0
- data/spec/support/real_time/connected_client.rb +9 -3
- data/spec/support/real_time/event.rb +1 -0
- data/spec/support/token.rb +1 -0
- data/spec/support/vcr.rb +5 -0
- metadata +226 -52
- data/examples/hi_real_time/Gemfile +0 -5
- data/examples/hi_real_time/hi.gif +0 -0
- data/examples/hi_real_time/hi.rb +0 -37
- data/examples/hi_real_time_async_celluloid/Gemfile +0 -6
- data/examples/hi_real_time_async_celluloid/Procfile +0 -2
- data/examples/hi_real_time_async_celluloid/hi.rb +0 -35
- data/examples/hi_real_time_async_eventmachine/Gemfile +0 -6
- data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
- data/examples/hi_real_time_async_eventmachine/hi.rb +0 -35
- data/lib/slack/real_time/concurrency/celluloid.rb +0 -103
- data/lib/slack/real_time/concurrency/eventmachine.rb +0 -66
- data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +0 -13
- data/lib/slack/web/api/patches/chat.2.attachments-json.patch +0 -17
- data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +0 -21
- data/lib/slack/web/api/patches/chat.4.postEphemeral-attachments-support.patch +0 -17
- data/lib/slack/web/api/patches/chat.5.postEphemeral-text-or-attachments.patch +0 -13
- data/screenshots/register-bot.png +0 -0
- data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -106
- data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -47
- data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -11
- data/spec/slack/web/api/errors/service_unavailable_spec.rb +0 -14
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -5,107 +6,6 @@ module Slack
|
|
5
6
|
module Api
|
6
7
|
module Endpoints
|
7
8
|
module Im
|
8
|
-
#
|
9
|
-
# Close a direct message channel.
|
10
|
-
#
|
11
|
-
# @option options [im] :channel
|
12
|
-
# Direct message channel to close.
|
13
|
-
# @see https://api.slack.com/methods/im.close
|
14
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.close.json
|
15
|
-
def im_close(options = {})
|
16
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
17
|
-
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
18
|
-
post('im.close', options)
|
19
|
-
end
|
20
|
-
|
21
|
-
#
|
22
|
-
# Fetches history of messages and events from direct message channel.
|
23
|
-
#
|
24
|
-
# @option options [im] :channel
|
25
|
-
# Direct message channel to fetch history for.
|
26
|
-
# @option options [Object] :inclusive
|
27
|
-
# Include messages with latest or oldest timestamp in results.
|
28
|
-
# @option options [timestamp] :latest
|
29
|
-
# End of time range of messages to include in results.
|
30
|
-
# @option options [timestamp] :oldest
|
31
|
-
# Start of time range of messages to include in results.
|
32
|
-
# @option options [Object] :unreads
|
33
|
-
# Include unread_count_display in the output?.
|
34
|
-
# @see https://api.slack.com/methods/im.history
|
35
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.history.json
|
36
|
-
def im_history(options = {})
|
37
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
38
|
-
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
39
|
-
post('im.history', options)
|
40
|
-
end
|
41
|
-
|
42
|
-
#
|
43
|
-
# Lists direct message channels for the calling user.
|
44
|
-
#
|
45
|
-
# @option options [Object] :cursor
|
46
|
-
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
47
|
-
# @option options [Object] :limit
|
48
|
-
# 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.
|
49
|
-
# @see https://api.slack.com/methods/im.list
|
50
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.list.json
|
51
|
-
def im_list(options = {})
|
52
|
-
if block_given?
|
53
|
-
Pagination::Cursor.new(self, :im_list, options).each do |page|
|
54
|
-
yield page
|
55
|
-
end
|
56
|
-
else
|
57
|
-
post('im.list', options)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
#
|
62
|
-
# Sets the read cursor in a direct message channel.
|
63
|
-
#
|
64
|
-
# @option options [im] :channel
|
65
|
-
# Direct message channel to set reading cursor in.
|
66
|
-
# @option options [timestamp] :ts
|
67
|
-
# Timestamp of the most recently seen message.
|
68
|
-
# @see https://api.slack.com/methods/im.mark
|
69
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.mark.json
|
70
|
-
def im_mark(options = {})
|
71
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
72
|
-
throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil?
|
73
|
-
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
74
|
-
post('im.mark', options)
|
75
|
-
end
|
76
|
-
|
77
|
-
#
|
78
|
-
# Opens a direct message channel.
|
79
|
-
#
|
80
|
-
# @option options [user] :user
|
81
|
-
# User to open a direct message channel with.
|
82
|
-
# @option options [Object] :include_locale
|
83
|
-
# Set this to true to receive the locale for this im. Defaults to false.
|
84
|
-
# @option options [Object] :return_im
|
85
|
-
# Boolean, indicates you want the full IM channel definition in the response.
|
86
|
-
# @see https://api.slack.com/methods/im.open
|
87
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.open.json
|
88
|
-
def im_open(options = {})
|
89
|
-
throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
|
90
|
-
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
91
|
-
post('im.open', options)
|
92
|
-
end
|
93
|
-
|
94
|
-
#
|
95
|
-
# Retrieve a thread of messages posted to a direct message conversation
|
96
|
-
#
|
97
|
-
# @option options [im] :channel
|
98
|
-
# Direct message channel to fetch thread from.
|
99
|
-
# @option options [Object] :thread_ts
|
100
|
-
# Unique identifier of a thread's parent message.
|
101
|
-
# @see https://api.slack.com/methods/im.replies
|
102
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.replies.json
|
103
|
-
def im_replies(options = {})
|
104
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
105
|
-
throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil?
|
106
|
-
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
107
|
-
post('im.replies', options)
|
108
|
-
end
|
109
9
|
end
|
110
10
|
end
|
111
11
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -10,6 +11,8 @@ module Slack
|
|
10
11
|
#
|
11
12
|
# @option options [Object] :users
|
12
13
|
# A comma-separated list of user ids, up to 400 per request.
|
14
|
+
# @option options [Object] :team_id
|
15
|
+
# Specify team_id starts with T in case of Org Token.
|
13
16
|
# @option options [Object] :to_old
|
14
17
|
# Specify true to convert W global user IDs to workspace-specific U IDs. Defaults to false.
|
15
18
|
# @see https://api.slack.com/methods/migration.exchange
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -5,102 +6,6 @@ module Slack
|
|
5
6
|
module Api
|
6
7
|
module Endpoints
|
7
8
|
module Mpim
|
8
|
-
#
|
9
|
-
# Closes a multiparty direct message channel.
|
10
|
-
#
|
11
|
-
# @option options [channel] :channel
|
12
|
-
# MPIM to close.
|
13
|
-
# @see https://api.slack.com/methods/mpim.close
|
14
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.close.json
|
15
|
-
def mpim_close(options = {})
|
16
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
17
|
-
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
18
|
-
post('mpim.close', options)
|
19
|
-
end
|
20
|
-
|
21
|
-
#
|
22
|
-
# Fetches history of messages and events from a multiparty direct message.
|
23
|
-
#
|
24
|
-
# @option options [channel] :channel
|
25
|
-
# Multiparty direct message to fetch history for.
|
26
|
-
# @option options [Object] :inclusive
|
27
|
-
# Include messages with latest or oldest timestamp in results.
|
28
|
-
# @option options [timestamp] :latest
|
29
|
-
# End of time range of messages to include in results.
|
30
|
-
# @option options [timestamp] :oldest
|
31
|
-
# Start of time range of messages to include in results.
|
32
|
-
# @option options [Object] :unreads
|
33
|
-
# Include unread_count_display in the output?.
|
34
|
-
# @see https://api.slack.com/methods/mpim.history
|
35
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.history.json
|
36
|
-
def mpim_history(options = {})
|
37
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
38
|
-
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
39
|
-
post('mpim.history', options)
|
40
|
-
end
|
41
|
-
|
42
|
-
#
|
43
|
-
# Lists multiparty direct message channels for the calling user.
|
44
|
-
#
|
45
|
-
# @option options [Object] :cursor
|
46
|
-
# 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.
|
47
|
-
# @option options [Object] :limit
|
48
|
-
# 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.
|
49
|
-
# @see https://api.slack.com/methods/mpim.list
|
50
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.list.json
|
51
|
-
def mpim_list(options = {})
|
52
|
-
if block_given?
|
53
|
-
Pagination::Cursor.new(self, :mpim_list, options).each do |page|
|
54
|
-
yield page
|
55
|
-
end
|
56
|
-
else
|
57
|
-
post('mpim.list', options)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
#
|
62
|
-
# Sets the read cursor in a multiparty direct message channel.
|
63
|
-
#
|
64
|
-
# @option options [channel] :channel
|
65
|
-
# multiparty direct message channel to set reading cursor in.
|
66
|
-
# @option options [timestamp] :ts
|
67
|
-
# Timestamp of the most recently seen message.
|
68
|
-
# @see https://api.slack.com/methods/mpim.mark
|
69
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.mark.json
|
70
|
-
def mpim_mark(options = {})
|
71
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
72
|
-
throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil?
|
73
|
-
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
74
|
-
post('mpim.mark', options)
|
75
|
-
end
|
76
|
-
|
77
|
-
#
|
78
|
-
# This method opens a multiparty direct message.
|
79
|
-
#
|
80
|
-
# @option options [Object] :users
|
81
|
-
# Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned.
|
82
|
-
# @see https://api.slack.com/methods/mpim.open
|
83
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.open.json
|
84
|
-
def mpim_open(options = {})
|
85
|
-
throw ArgumentError.new('Required arguments :users missing') if options[:users].nil?
|
86
|
-
post('mpim.open', options)
|
87
|
-
end
|
88
|
-
|
89
|
-
#
|
90
|
-
# Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message.
|
91
|
-
#
|
92
|
-
# @option options [channel] :channel
|
93
|
-
# Multiparty direct message channel to fetch thread from.
|
94
|
-
# @option options [Object] :thread_ts
|
95
|
-
# Unique identifier of a thread's parent message.
|
96
|
-
# @see https://api.slack.com/methods/mpim.replies
|
97
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.replies.json
|
98
|
-
def mpim_replies(options = {})
|
99
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
100
|
-
throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil?
|
101
|
-
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
102
|
-
post('mpim.replies', options)
|
103
|
-
end
|
104
9
|
end
|
105
10
|
end
|
106
11
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -17,13 +18,10 @@ module Slack
|
|
17
18
|
# @option options [Object] :redirect_uri
|
18
19
|
# This must match the originally submitted URI (if one was sent).
|
19
20
|
# @option options [Object] :single_channel
|
20
|
-
# Request the user to add your app only to a single channel.
|
21
|
+
# Request the user to add your app only to a single channel. Only valid with a legacy workspace app.
|
21
22
|
# @see https://api.slack.com/methods/oauth.access
|
22
23
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth/oauth.access.json
|
23
24
|
def oauth_access(options = {})
|
24
|
-
throw ArgumentError.new('Required arguments :client_id missing') if options[:client_id].nil?
|
25
|
-
throw ArgumentError.new('Required arguments :client_secret missing') if options[:client_secret].nil?
|
26
|
-
throw ArgumentError.new('Required arguments :code missing') if options[:code].nil?
|
27
25
|
post('oauth.access', options)
|
28
26
|
end
|
29
27
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module OauthV2
|
9
|
+
#
|
10
|
+
# Exchanges a temporary OAuth verifier code for an access token.
|
11
|
+
#
|
12
|
+
# @option options [Object] :code
|
13
|
+
# The code param returned via the OAuth callback.
|
14
|
+
# @option options [Object] :client_id
|
15
|
+
# Issued when you created your application.
|
16
|
+
# @option options [Object] :client_secret
|
17
|
+
# Issued when you created your application.
|
18
|
+
# @option options [Object] :redirect_uri
|
19
|
+
# This must match the originally submitted URI (if one was sent).
|
20
|
+
# @see https://api.slack.com/methods/oauth.v2.access
|
21
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.access.json
|
22
|
+
def oauth_v2_access(options = {})
|
23
|
+
throw ArgumentError.new('Required arguments :code missing') if options[:code].nil?
|
24
|
+
post('oauth.v2.access', options)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -10,17 +11,13 @@ module Slack
|
|
10
11
|
#
|
11
12
|
# @option options [channel] :channel
|
12
13
|
# Channel to pin the item in.
|
13
|
-
# @option options [file] :file
|
14
|
-
# File to pin.
|
15
|
-
# @option options [Object] :file_comment
|
16
|
-
# File comment to pin.
|
17
14
|
# @option options [Object] :timestamp
|
18
15
|
# Timestamp of the message to pin.
|
19
16
|
# @see https://api.slack.com/methods/pins.add
|
20
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.add.json
|
21
18
|
def pins_add(options = {})
|
22
19
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
23
|
-
options = options.merge(channel:
|
20
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
24
21
|
post('pins.add', options)
|
25
22
|
end
|
26
23
|
|
@@ -33,7 +30,7 @@ module Slack
|
|
33
30
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.list.json
|
34
31
|
def pins_list(options = {})
|
35
32
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
36
|
-
options = options.merge(channel:
|
33
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
37
34
|
post('pins.list', options)
|
38
35
|
end
|
39
36
|
|
@@ -42,17 +39,13 @@ module Slack
|
|
42
39
|
#
|
43
40
|
# @option options [channel] :channel
|
44
41
|
# Channel where the item is pinned to.
|
45
|
-
# @option options [file] :file
|
46
|
-
# File to un-pin.
|
47
|
-
# @option options [Object] :file_comment
|
48
|
-
# File comment to un-pin.
|
49
42
|
# @option options [Object] :timestamp
|
50
43
|
# Timestamp of the message to un-pin.
|
51
44
|
# @see https://api.slack.com/methods/pins.remove
|
52
45
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.remove.json
|
53
46
|
def pins_remove(options = {})
|
54
47
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
55
|
-
options = options.merge(channel:
|
48
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
56
49
|
post('pins.remove', options)
|
57
50
|
end
|
58
51
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -8,21 +9,19 @@ module Slack
|
|
8
9
|
#
|
9
10
|
# Adds a reaction to an item.
|
10
11
|
#
|
11
|
-
# @option options [Object] :name
|
12
|
-
# Reaction (emoji) name.
|
13
12
|
# @option options [channel] :channel
|
14
13
|
# Channel where the message to add reaction to was posted.
|
15
|
-
# @option options [
|
16
|
-
#
|
17
|
-
# @option options [Object] :file_comment
|
18
|
-
# File comment to add reaction to.
|
14
|
+
# @option options [Object] :name
|
15
|
+
# Reaction (emoji) name.
|
19
16
|
# @option options [Object] :timestamp
|
20
17
|
# Timestamp of the message to add reaction to.
|
21
18
|
# @see https://api.slack.com/methods/reactions.add
|
22
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.add.json
|
23
20
|
def reactions_add(options = {})
|
21
|
+
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
24
22
|
throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
|
25
|
-
|
23
|
+
throw ArgumentError.new('Required arguments :timestamp missing') if options[:timestamp].nil?
|
24
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
26
25
|
post('reactions.add', options)
|
27
26
|
end
|
28
27
|
|
@@ -42,7 +41,7 @@ module Slack
|
|
42
41
|
# @see https://api.slack.com/methods/reactions.get
|
43
42
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.get.json
|
44
43
|
def reactions_get(options = {})
|
45
|
-
options = options.merge(channel:
|
44
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
46
45
|
post('reactions.get', options)
|
47
46
|
end
|
48
47
|
|
@@ -55,6 +54,8 @@ module Slack
|
|
55
54
|
# If true always return the complete reaction list.
|
56
55
|
# @option options [Object] :limit
|
57
56
|
# 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.
|
57
|
+
# @option options [Object] :team_id
|
58
|
+
# encoded team id to list reactions in, required if org token is used.
|
58
59
|
# @option options [user] :user
|
59
60
|
# Show reactions made by this user. Defaults to the authed user.
|
60
61
|
# @see https://api.slack.com/methods/reactions.list
|
@@ -87,7 +88,7 @@ module Slack
|
|
87
88
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.remove.json
|
88
89
|
def reactions_remove(options = {})
|
89
90
|
throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
|
90
|
-
options = options.merge(channel:
|
91
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
91
92
|
post('reactions.remove', options)
|
92
93
|
end
|
93
94
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -16,6 +17,8 @@ module Slack
|
|
16
17
|
# Return matches sorted by either score or timestamp.
|
17
18
|
# @option options [Object] :sort_dir
|
18
19
|
# Change sort direction to ascending (asc) or descending (desc).
|
20
|
+
# @option options [Object] :team_id
|
21
|
+
# encoded team id to search in, required if org token is used.
|
19
22
|
# @see https://api.slack.com/methods/search.all
|
20
23
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.all.json
|
21
24
|
def search_all(options = {})
|
@@ -34,6 +37,8 @@ module Slack
|
|
34
37
|
# Return matches sorted by either score or timestamp.
|
35
38
|
# @option options [Object] :sort_dir
|
36
39
|
# Change sort direction to ascending (asc) or descending (desc).
|
40
|
+
# @option options [Object] :team_id
|
41
|
+
# encoded team id to search in, required if org token is used.
|
37
42
|
# @see https://api.slack.com/methods/search.files
|
38
43
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.files.json
|
39
44
|
def search_files(options = {})
|
@@ -52,6 +57,8 @@ module Slack
|
|
52
57
|
# Return matches sorted by either score or timestamp.
|
53
58
|
# @option options [Object] :sort_dir
|
54
59
|
# Change sort direction to ascending (asc) or descending (desc).
|
60
|
+
# @option options [Object] :team_id
|
61
|
+
# encoded team id to search in, required if org token is used.
|
55
62
|
# @see https://api.slack.com/methods/search.messages
|
56
63
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.messages.json
|
57
64
|
def search_messages(options = {})
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -19,7 +20,7 @@ module Slack
|
|
19
20
|
# @see https://api.slack.com/methods/stars.add
|
20
21
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/stars/stars.add.json
|
21
22
|
def stars_add(options = {})
|
22
|
-
options = options.merge(channel:
|
23
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
23
24
|
post('stars.add', options)
|
24
25
|
end
|
25
26
|
|
@@ -56,7 +57,7 @@ module Slack
|
|
56
57
|
# @see https://api.slack.com/methods/stars.remove
|
57
58
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/stars/stars.remove.json
|
58
59
|
def stars_remove(options = {})
|
59
|
-
options = options.merge(channel:
|
60
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
60
61
|
post('stars.remove', options)
|
61
62
|
end
|
62
63
|
end
|