slack-ruby-client 0.13.1 → 2.0.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/.github/workflows/integration_test.yml +26 -0
- data/.github/workflows/lint.yml +14 -0
- data/.github/workflows/pr_lint.yml +21 -0
- data/.github/workflows/test.yml +36 -0
- data/.gitignore +5 -3
- data/.rubocop.yml +34 -5
- data/.rubocop_todo.yml +180 -46
- data/.ruby-version +1 -0
- data/CHANGELOG.md +119 -2
- data/CONTRIBUTING.md +23 -11
- data/Dangerfile +2 -0
- data/Gemfile +22 -5
- data/Gemfile.danger +6 -0
- data/LICENSE.md +1 -1
- data/README.md +236 -101
- data/RELEASING.md +2 -2
- data/Rakefile +2 -1
- data/UPGRADING.md +100 -2
- data/bin/commands/admin_analytics.rb +16 -0
- data/bin/commands/admin_apps.rb +51 -0
- data/bin/commands/admin_apps_approved.rb +17 -0
- data/bin/commands/admin_apps_requests.rb +28 -0
- data/bin/commands/admin_apps_restricted.rb +17 -0
- data/bin/commands/admin_audit_anomaly_allow.rb +23 -0
- data/bin/commands/admin_auth_policy.rb +39 -0
- data/bin/commands/admin_barriers.rb +47 -0
- data/bin/commands/admin_conversations.rb +171 -0
- data/bin/commands/admin_conversations_ekm.rb +17 -0
- data/bin/commands/admin_conversations_restrictAccess.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 +98 -0
- data/bin/commands/admin_users_session.rb +78 -0
- data/bin/commands/admin_users_unsupportedVersions.rb +15 -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_manifest.rb +52 -0
- data/bin/commands/auth.rb +1 -0
- data/bin/commands/auth_teams.rb +16 -0
- data/bin/commands/bookmarks.rb +53 -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/chat.rb +61 -14
- data/bin/commands/chat_scheduledMessages.rb +19 -0
- data/bin/commands/conversations.rb +82 -10
- data/bin/commands/dialog.rb +1 -0
- data/bin/commands/dnd.rb +6 -3
- data/bin/commands/emoji.rb +1 -0
- data/bin/commands/files.rb +34 -18
- data/bin/commands/files_comments.rb +1 -21
- data/bin/commands/files_remote.rb +78 -0
- data/bin/commands/migration.rb +2 -0
- data/bin/commands/oauth.rb +2 -14
- data/bin/commands/oauth_v2.rb +29 -0
- data/bin/commands/openid_connect.rb +27 -0
- data/bin/commands/pins.rb +3 -6
- data/bin/commands/reactions.rb +3 -3
- data/bin/commands/reminders.rb +7 -0
- data/bin/commands/rtm.rb +1 -15
- data/bin/commands/search.rb +6 -1
- data/bin/commands/stars.rb +8 -6
- data/bin/commands/team.rb +6 -0
- data/bin/commands/team_billing.rb +13 -0
- data/bin/commands/team_preferences.rb +13 -0
- data/bin/commands/team_profile.rb +1 -0
- data/bin/commands/tooling_tokens.rb +14 -0
- data/bin/commands/usergroups.rb +7 -1
- data/bin/commands/usergroups_users.rb +3 -0
- data/bin/commands/users.rb +6 -4
- 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 +50 -0
- data/bin/commands/workflows.rb +38 -0
- data/bin/commands.rb +41 -8
- data/bin/slack +3 -4
- 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/config.rb +2 -2
- data/lib/slack/events/config.rb +32 -0
- data/lib/slack/events/request.rb +72 -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 +6 -3
- 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/templates/event_handler.erb +5 -1
- data/lib/slack/real_time/api/typing.rb +5 -2
- data/lib/slack/real_time/client.rb +105 -54
- data/lib/slack/real_time/concurrency/async.rb +77 -6
- data/lib/slack/real_time/concurrency.rb +1 -2
- data/lib/slack/real_time/config.rb +9 -13
- 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 +5 -0
- data/lib/slack/real_time/models/im.rb +1 -0
- data/lib/slack/real_time/models/{group.rb → mpim.rb} +2 -1
- 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/models.rb +3 -1
- data/lib/slack/real_time/socket.rb +45 -17
- data/lib/slack/real_time/stores/base.rb +28 -14
- data/lib/slack/real_time/stores/starter.rb +325 -297
- data/lib/slack/real_time/stores/store.rb +271 -196
- data/lib/slack/real_time/stores.rb +2 -7
- data/lib/slack/version.rb +2 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +28 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +78 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +51 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +264 -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_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 +163 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +122 -0
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
- data/lib/slack/web/api/endpoints/api.rb +2 -3
- 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_manifest.rb +77 -0
- data/lib/slack/web/api/endpoints/auth.rb +2 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +88 -0
- data/lib/slack/web/api/endpoints/bots.rb +4 -1
- 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/chat.rb +168 -65
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
- data/lib/slack/web/api/endpoints/conversations.rb +182 -67
- data/lib/slack/web/api/endpoints/dialog.rb +5 -4
- data/lib/slack/web/api/endpoints/dnd.rb +9 -4
- data/lib/slack/web/api/endpoints/emoji.rb +1 -0
- data/lib/slack/web/api/endpoints/files.rb +69 -37
- data/lib/slack/web/api/endpoints/files_comments.rb +4 -36
- data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
- data/lib/slack/web/api/endpoints/migration.rb +6 -3
- data/lib/slack/web/api/endpoints/oauth.rb +7 -31
- data/lib/slack/web/api/endpoints/oauth_v2.rb +48 -0
- data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
- data/lib/slack/web/api/endpoints/pins.rb +11 -18
- data/lib/slack/web/api/endpoints/reactions.rb +22 -21
- data/lib/slack/web/api/endpoints/reminders.rb +23 -10
- data/lib/slack/web/api/endpoints/rtm.rb +3 -25
- data/lib/slack/web/api/endpoints/search.rb +31 -16
- data/lib/slack/web/api/endpoints/stars.rb +14 -11
- data/lib/slack/web/api/endpoints/team.rb +15 -4
- data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
- data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +2 -1
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +31 -20
- data/lib/slack/web/api/endpoints/usergroups_users.rb +13 -8
- data/lib/slack/web/api/endpoints/users.rb +24 -23
- data/lib/slack/web/api/endpoints/users_admin.rb +3 -2
- data/lib/slack/web/api/endpoints/users_prefs.rb +1 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +8 -7
- data/lib/slack/web/api/endpoints/views.rb +102 -0
- data/lib/slack/web/api/endpoints/workflows.rb +61 -0
- data/lib/slack/web/api/endpoints.rb +82 -18
- data/lib/slack/web/api/error.rb +1 -0
- data/lib/slack/web/api/errors/server_error.rb +37 -0
- data/lib/slack/web/api/errors/slack_error.rb +14 -1
- data/lib/slack/web/api/errors/too_many_requests_error.rb +2 -4
- data/lib/slack/web/api/errors.rb +1116 -0
- data/lib/slack/web/api/mixins/{channels.id.rb → conversations.id.rb} +5 -6
- data/lib/slack/web/api/mixins/ids.id.rb +3 -2
- data/lib/slack/web/api/mixins/users.id.rb +3 -4
- data/lib/slack/web/api/mixins/users.search.rb +3 -1
- data/lib/slack/web/api/mixins.rb +2 -2
- data/lib/slack/web/api/patches/chat.attachments-blocks.patch +69 -0
- data/lib/slack/web/api/patches/{dialog.1.open-json-support.patch → dialog.encoded-json.patch} +4 -4
- data/lib/slack/web/api/patches/views.view-json.patch +55 -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 -2
- data/lib/slack/web/api/templates/errors.erb +20 -0
- data/lib/slack/web/api/templates/method.erb +6 -2
- 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 +5 -2
- data/lib/slack/web/faraday/connection.rb +24 -20
- data/lib/slack/web/faraday/request.rb +5 -1
- data/lib/slack/web/faraday/response/raise_error.rb +14 -7
- data/lib/slack/web/faraday/response/wrap_error.rb +24 -0
- data/lib/slack/web/pagination/cursor.rb +7 -7
- data/lib/slack-ruby-client.rb +12 -5
- data/lib/slack.rb +1 -0
- data/lib/slack_ruby_client.rb +1 -0
- data/lib/tasks/git.rake +1 -0
- data/lib/tasks/real_time.rake +51 -21
- data/lib/tasks/update.rake +1 -0
- data/lib/tasks/web.rake +48 -12
- data/screenshots/create-app.png +0 -0
- data/slack-ruby-client.gemspec +7 -12
- data/spec/fixtures/slack/web/429_error.yml +50 -54
- data/spec/fixtures/slack/web/auth_test_error.yml +51 -18
- data/spec/fixtures/slack/web/auth_test_success.yml +50 -26
- data/spec/fixtures/slack/web/conversations_info.yml +167 -0
- data/spec/fixtures/slack/web/conversations_setTopic.yml +84 -0
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +172 -0
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +253 -0
- data/spec/fixtures/slack/web/paginated_users_list.yml +501 -69
- data/spec/fixtures/slack/web/rtm_connect.yml +347 -26
- data/spec/fixtures/slack/web/users_info.yml +153 -69
- data/spec/fixtures/slack/web/users_list.yml +102 -41
- data/spec/fixtures/slack/web/views_open_error.yml +83 -0
- data/spec/integration/integration_spec.rb +115 -47
- data/spec/slack/config_spec.rb +2 -0
- data/spec/slack/events/config_spec.rb +35 -0
- data/spec/slack/events/request_spec.rb +188 -0
- data/spec/slack/messages/formatting_spec.rb +35 -13
- data/spec/slack/real_time/api/message_spec.rb +7 -2
- data/spec/slack/real_time/api/ping_spec.rb +3 -1
- data/spec/slack/real_time/api/typing_spec.rb +6 -2
- data/spec/slack/real_time/client_spec.rb +300 -142
- 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 +20 -17
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +3 -2
- data/spec/slack/real_time/event_handlers/im_spec.rb +31 -27
- data/spec/slack/real_time/event_handlers/{group_spec.rb → private_channel_spec.rb} +36 -27
- data/spec/slack/real_time/event_handlers/{channel_spec.rb → public_channel_spec.rb} +31 -24
- data/spec/slack/real_time/event_handlers/team_spec.rb +8 -7
- data/spec/slack/real_time/event_handlers/user_spec.rb +7 -5
- data/spec/slack/real_time/rtm_connect_spec.rb +2 -1
- data/spec/slack/real_time/stores/store_spec.rb +50 -0
- data/spec/slack/slack_spec.rb +41 -6
- 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 +13 -0
- data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +18 -0
- data/spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +35 -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 +98 -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 +41 -0
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +67 -0
- data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +8 -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_manifest_spec.rb +36 -0
- data/spec/slack/web/api/endpoints/apps_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/{apps_permissions_resources_spec.rb → auth_teams_spec.rb} +2 -1
- data/spec/slack/web/api/endpoints/bookmarks_spec.rb +40 -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/custom_specs/auth_spec.rb +9 -7
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +144 -40
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +18 -6
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +8 -3
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +112 -0
- data/spec/slack/web/api/endpoints/dnd_spec.rb +4 -3
- 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 +18 -4
- data/spec/slack/web/api/endpoints/migration_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/oauth_spec.rb +1 -22
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/openid_connect_spec.rb +8 -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/{apps_permissions_scopes_spec.rb → team_billing_spec.rb} +2 -1
- data/spec/slack/web/api/endpoints/team_preferences_spec.rb +8 -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/tooling_tokens_spec.rb +13 -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 +7 -7
- data/spec/slack/web/api/errors/slack_error_spec.rb +26 -7
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +21 -0
- data/spec/slack/web/api/mixins/conversations_spec.rb +45 -0
- data/spec/slack/web/api/mixins/users_spec.rb +19 -8
- data/spec/slack/web/api/pagination/cursor_spec.rb +47 -15
- data/spec/slack/web/client_spec.rb +199 -22
- data/spec/slack/web/faraday/request_spec.rb +80 -0
- data/spec/slack/web/faraday/response/raise_error_spec.rb +48 -12
- data/spec/spec_helper.rb +9 -2
- 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 +6 -6
- data/spec/support/real_time/event.rb +1 -0
- data/spec/support/real_time/loaded_client.rb +120 -0
- data/spec/support/token.rb +1 -0
- data/spec/support/vcr.rb +37 -1
- metadata +174 -262
- data/.travis.yml +0 -32
- data/bin/commands/apps_permissions.rb +0 -22
- data/bin/commands/apps_permissions_resources.rb +0 -14
- data/bin/commands/apps_permissions_scopes.rb +0 -12
- data/bin/commands/apps_permissions_users.rb +0 -25
- data/bin/commands/channels.rb +0 -175
- data/bin/commands/groups.rb +0 -174
- data/bin/commands/im.rb +0 -67
- data/bin/commands/mpim.rb +0 -65
- 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 -118
- data/lib/slack/real_time/concurrency/eventmachine.rb +0 -66
- data/lib/slack/web/api/endpoints/apps_permissions.rb +0 -35
- data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +0 -30
- data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +0 -20
- data/lib/slack/web/api/endpoints/apps_permissions_users.rb +0 -49
- data/lib/slack/web/api/endpoints/channels.rb +0 -266
- data/lib/slack/web/api/endpoints/groups.rb +0 -265
- data/lib/slack/web/api/endpoints/im.rb +0 -113
- data/lib/slack/web/api/endpoints/mpim.rb +0 -108
- data/lib/slack/web/api/endpoints/presence.rb +0 -23
- data/lib/slack/web/api/mixins/channels.id.json +0 -20
- data/lib/slack/web/api/mixins/groups.id.json +0 -20
- data/lib/slack/web/api/mixins/groups.id.rb +0 -26
- 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/fixtures/slack/web/503_error.yml +0 -14
- data/spec/fixtures/slack/web/channels_info.yml +0 -46
- data/spec/fixtures/slack/web/groups_info.yml +0 -43
- data/spec/fixtures/slack/web/rtm_start.yml +0 -104
- 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/real_time/rtm_start_spec.rb +0 -13
- data/spec/slack/real_time/store_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -15
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -100
- 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/endpoints/im_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -38
- data/spec/slack/web/api/errors/service_unavailable_spec.rb +0 -14
- data/spec/slack/web/api/mixins/channels_spec.rb +0 -33
- data/spec/slack/web/api/mixins/groups_spec.rb +0 -33
@@ -1,365 +1,350 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Slack
|
2
4
|
module RealTime
|
3
5
|
module Stores
|
4
|
-
#
|
6
|
+
# Stores only basic team and self info
|
5
7
|
class Starter < Base
|
6
|
-
attr_reader :self
|
7
|
-
|
8
|
-
attr_reader :team
|
8
|
+
attr_reader :self, :team
|
9
9
|
|
10
|
-
def initialize(attrs)
|
10
|
+
def initialize(attrs, _options = {})
|
11
11
|
@team = Models::Team.new(attrs.team)
|
12
|
-
@self = Models::
|
12
|
+
@self = Models::User.new(attrs.self)
|
13
13
|
end
|
14
14
|
|
15
15
|
### RealTime Events
|
16
16
|
|
17
|
-
#
|
18
|
-
# @see https://api.slack.com/events/
|
19
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
20
|
-
# on :
|
21
|
-
|
22
|
-
# Determine the current presence status for a list of users.
|
23
|
-
# @see https://api.slack.com/events/presence_query
|
24
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_query.json
|
25
|
-
# on :presence_query do |data|
|
26
|
-
|
27
|
-
# The membership of an existing User Group has changed.
|
28
|
-
# @see https://api.slack.com/events/subteam_members_changed
|
29
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_members_changed.json
|
30
|
-
# on :subteam_members_changed do |data|
|
31
|
-
|
32
|
-
# Subscribe to presence events for the specified users.
|
33
|
-
# @see https://api.slack.com/events/presence_sub
|
34
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_sub.json
|
35
|
-
# on :presence_sub do |data|
|
36
|
-
|
37
|
-
# A user left a public or private channel.
|
38
|
-
# @see https://api.slack.com/events/member_left_channel
|
39
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/member_left_channel.json
|
40
|
-
# on :member_left_channel do |data|
|
17
|
+
# The list of accounts a user is signed into has changed.
|
18
|
+
# @see https://api.slack.com/events/accounts_changed
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/accounts_changed.json
|
20
|
+
# on :accounts_changed do |data|
|
41
21
|
|
42
|
-
# A user
|
43
|
-
# @see https://api.slack.com/events/
|
44
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
45
|
-
# on :
|
22
|
+
# A bot user was added.
|
23
|
+
# @see https://api.slack.com/events/bot_added
|
24
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/bot_added.json
|
25
|
+
# on :bot_added do |data|
|
46
26
|
|
47
|
-
#
|
48
|
-
# @see https://api.slack.com/events/
|
49
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
50
|
-
# on :
|
27
|
+
# A bot user was changed.
|
28
|
+
# @see https://api.slack.com/events/bot_changed
|
29
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/bot_changed.json
|
30
|
+
# on :bot_changed do |data|
|
51
31
|
|
52
|
-
#
|
53
|
-
# @see https://api.slack.com/events/
|
54
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
55
|
-
# on :
|
32
|
+
# A channel was archived.
|
33
|
+
# @see https://api.slack.com/events/channel_archive
|
34
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_archive.json
|
35
|
+
# on :channel_archive do |data|
|
56
36
|
|
57
|
-
# A
|
58
|
-
# @see https://api.slack.com/events/
|
59
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
60
|
-
# on :
|
37
|
+
# A channel was created.
|
38
|
+
# @see https://api.slack.com/events/channel_created
|
39
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_created.json
|
40
|
+
# on :channel_created do |data|
|
61
41
|
|
62
|
-
# A
|
63
|
-
# @see https://api.slack.com/events/
|
64
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
65
|
-
# on :
|
42
|
+
# A channel was deleted.
|
43
|
+
# @see https://api.slack.com/events/channel_deleted
|
44
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_deleted.json
|
45
|
+
# on :channel_deleted do |data|
|
66
46
|
|
67
|
-
#
|
68
|
-
# @see https://api.slack.com/events/
|
69
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
70
|
-
# on :
|
47
|
+
# Bulk updates were made to a channel's history.
|
48
|
+
# @see https://api.slack.com/events/channel_history_changed
|
49
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_history_changed.json
|
50
|
+
# on :channel_history_changed do |data|
|
71
51
|
|
72
|
-
#
|
73
|
-
# @see https://api.slack.com/events/
|
74
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
75
|
-
# on :
|
52
|
+
# You joined a channel.
|
53
|
+
# @see https://api.slack.com/events/channel_joined
|
54
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_joined.json
|
55
|
+
# on :channel_joined do |data|
|
76
56
|
|
77
|
-
#
|
78
|
-
# @see https://api.slack.com/events/
|
79
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
80
|
-
# on :
|
57
|
+
# You left a channel.
|
58
|
+
# @see https://api.slack.com/events/channel_left
|
59
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_left.json
|
60
|
+
# on :channel_left do |data|
|
81
61
|
|
82
|
-
#
|
83
|
-
# @see https://api.slack.com/events/
|
84
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
85
|
-
# on :
|
62
|
+
# Your channel read marker was updated.
|
63
|
+
# @see https://api.slack.com/events/channel_marked
|
64
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_marked.json
|
65
|
+
# on :channel_marked do |data|
|
86
66
|
|
87
|
-
# A
|
88
|
-
# @see https://api.slack.com/events/
|
89
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
90
|
-
# on :
|
67
|
+
# A channel was renamed.
|
68
|
+
# @see https://api.slack.com/events/channel_rename
|
69
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_rename.json
|
70
|
+
# on :channel_rename do |data|
|
91
71
|
|
92
|
-
#
|
93
|
-
# @see https://api.slack.com/events/
|
94
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
95
|
-
# on :
|
72
|
+
# A channel was unarchived.
|
73
|
+
# @see https://api.slack.com/events/channel_unarchive
|
74
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_unarchive.json
|
75
|
+
# on :channel_unarchive do |data|
|
96
76
|
|
97
|
-
#
|
98
|
-
# @see https://api.slack.com/events/
|
99
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
100
|
-
# on :
|
77
|
+
# A slash command has been added or changed.
|
78
|
+
# @see https://api.slack.com/events/commands_changed
|
79
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/commands_changed.json
|
80
|
+
# on :commands_changed do |data|
|
101
81
|
|
102
|
-
#
|
103
|
-
# @see https://api.slack.com/events/
|
104
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
105
|
-
# on :
|
82
|
+
# Do not Disturb settings changed for the current user.
|
83
|
+
# @see https://api.slack.com/events/dnd_updated
|
84
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/dnd_updated.json
|
85
|
+
# on :dnd_updated do |data|
|
106
86
|
|
107
|
-
#
|
108
|
-
# @see https://api.slack.com/events/
|
109
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
110
|
-
# on :
|
87
|
+
# Do not Disturb settings changed for a member.
|
88
|
+
# @see https://api.slack.com/events/dnd_updated_user
|
89
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/dnd_updated_user.json
|
90
|
+
# on :dnd_updated_user do |data|
|
111
91
|
|
112
|
-
#
|
113
|
-
# @see https://api.slack.com/events/
|
114
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
115
|
-
|
92
|
+
# The workspace email domain has changed.
|
93
|
+
# @see https://api.slack.com/events/email_domain_changed
|
94
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/email_domain_changed.json
|
95
|
+
on :email_domain_changed do |data|
|
96
|
+
team.email_domain = data.email_domain
|
97
|
+
end
|
116
98
|
|
117
|
-
# A
|
118
|
-
# @see https://api.slack.com/events/
|
119
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
120
|
-
# on :
|
99
|
+
# A custom emoji has been added or changed.
|
100
|
+
# @see https://api.slack.com/events/emoji_changed
|
101
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/emoji_changed.json
|
102
|
+
# on :emoji_changed do |data|
|
121
103
|
|
122
|
-
#
|
123
|
-
# @see https://api.slack.com/events/
|
124
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
125
|
-
# on :
|
104
|
+
# An enterprise grid migration has finished on an external workspace..
|
105
|
+
# @see https://api.slack.com/events/external_org_migration_finished
|
106
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/external_org_migration_finished.json
|
107
|
+
# on :external_org_migration_finished do |data|
|
126
108
|
|
127
|
-
#
|
128
|
-
# @see https://api.slack.com/events/
|
129
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
130
|
-
# on :
|
109
|
+
# An enterprise grid migration has started on an external workspace..
|
110
|
+
# @see https://api.slack.com/events/external_org_migration_started
|
111
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/external_org_migration_started.json
|
112
|
+
# on :external_org_migration_started do |data|
|
131
113
|
|
132
|
-
# A
|
133
|
-
# @see https://api.slack.com/events/
|
134
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
135
|
-
# on :
|
114
|
+
# A file was changed.
|
115
|
+
# @see https://api.slack.com/events/file_change
|
116
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_change.json
|
117
|
+
# on :file_change do |data|
|
136
118
|
|
137
|
-
# A
|
138
|
-
# @see https://api.slack.com/events/
|
139
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
140
|
-
# on :
|
119
|
+
# A file comment was added.
|
120
|
+
# @see https://api.slack.com/events/file_comment_added
|
121
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_added.json
|
122
|
+
# on :file_comment_added do |data|
|
141
123
|
|
142
|
-
#
|
143
|
-
# @see https://api.slack.com/events/
|
144
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
145
|
-
# on :
|
124
|
+
# A file comment was deleted.
|
125
|
+
# @see https://api.slack.com/events/file_comment_deleted
|
126
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_deleted.json
|
127
|
+
# on :file_comment_deleted do |data|
|
146
128
|
|
147
|
-
# A
|
148
|
-
# @see https://api.slack.com/events/
|
149
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
150
|
-
# on :
|
129
|
+
# A file comment was edited.
|
130
|
+
# @see https://api.slack.com/events/file_comment_edited
|
131
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_edited.json
|
132
|
+
# on :file_comment_edited do |data|
|
151
133
|
|
152
|
-
# A
|
153
|
-
# @see https://api.slack.com/events/
|
154
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
155
|
-
# on :
|
134
|
+
# A file was created.
|
135
|
+
# @see https://api.slack.com/events/file_created
|
136
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_created.json
|
137
|
+
# on :file_created do |data|
|
156
138
|
|
157
|
-
#
|
158
|
-
# @see https://api.slack.com/events/
|
159
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
160
|
-
# on :
|
139
|
+
# A file was deleted.
|
140
|
+
# @see https://api.slack.com/events/file_deleted
|
141
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_deleted.json
|
142
|
+
# on :file_deleted do |data|
|
161
143
|
|
162
|
-
#
|
163
|
-
# @see https://api.slack.com/events/
|
164
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
165
|
-
# on :
|
144
|
+
# A file was made public.
|
145
|
+
# @see https://api.slack.com/events/file_public
|
146
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_public.json
|
147
|
+
# on :file_public do |data|
|
166
148
|
|
167
|
-
# A
|
168
|
-
# @see https://api.slack.com/events/
|
169
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
170
|
-
# on :
|
149
|
+
# A file was shared.
|
150
|
+
# @see https://api.slack.com/events/file_shared
|
151
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_shared.json
|
152
|
+
# on :file_shared do |data|
|
171
153
|
|
172
|
-
#
|
173
|
-
# @see https://api.slack.com/events/
|
174
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
175
|
-
# on :
|
154
|
+
# A file was unshared.
|
155
|
+
# @see https://api.slack.com/events/file_unshared
|
156
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_unshared.json
|
157
|
+
# on :file_unshared do |data|
|
176
158
|
|
177
|
-
#
|
178
|
-
# @see https://api.slack.com/events/
|
179
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
180
|
-
# on :
|
159
|
+
# The server intends to close the connection soon..
|
160
|
+
# @see https://api.slack.com/events/goodbye
|
161
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/goodbye.json
|
162
|
+
# on :goodbye do |data|
|
181
163
|
|
182
|
-
#
|
183
|
-
# @see https://api.slack.com/events/
|
184
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
185
|
-
# on :
|
164
|
+
# A private channel was archived.
|
165
|
+
# @see https://api.slack.com/events/group_archive
|
166
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_archive.json
|
167
|
+
# on :group_archive do |data|
|
186
168
|
|
187
|
-
#
|
188
|
-
# @see https://api.slack.com/events/
|
189
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
190
|
-
# on :
|
169
|
+
# You closed a private channel.
|
170
|
+
# @see https://api.slack.com/events/group_close
|
171
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_close.json
|
172
|
+
# on :group_close do |data|
|
191
173
|
|
192
|
-
# A private
|
193
|
-
# @see https://api.slack.com/events/
|
194
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
195
|
-
# on :
|
174
|
+
# A private channel was deleted.
|
175
|
+
# @see https://api.slack.com/events/group_deleted
|
176
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_deleted.json
|
177
|
+
# on :group_deleted do |data|
|
196
178
|
|
197
|
-
#
|
198
|
-
# @see https://api.slack.com/events/
|
199
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
200
|
-
# on :
|
179
|
+
# Bulk updates were made to a private channel's history.
|
180
|
+
# @see https://api.slack.com/events/group_history_changed
|
181
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_history_changed.json
|
182
|
+
# on :group_history_changed do |data|
|
201
183
|
|
202
|
-
#
|
203
|
-
# @see https://api.slack.com/events/
|
204
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
205
|
-
# on :
|
184
|
+
# You joined a private channel.
|
185
|
+
# @see https://api.slack.com/events/group_joined
|
186
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_joined.json
|
187
|
+
# on :group_joined do |data|
|
206
188
|
|
207
|
-
# You left a private
|
189
|
+
# You left a private channel.
|
208
190
|
# @see https://api.slack.com/events/group_left
|
209
191
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_left.json
|
210
192
|
# on :group_left do |data|
|
211
193
|
|
212
|
-
#
|
213
|
-
# @see https://api.slack.com/events/
|
214
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
215
|
-
# on :
|
194
|
+
# A private channel read marker was updated.
|
195
|
+
# @see https://api.slack.com/events/group_marked
|
196
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_marked.json
|
197
|
+
# on :group_marked do |data|
|
216
198
|
|
217
|
-
#
|
218
|
-
# @see https://api.slack.com/events/
|
219
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
220
|
-
# on :
|
199
|
+
# You created a group DM.
|
200
|
+
# @see https://api.slack.com/events/group_open
|
201
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_open.json
|
202
|
+
# on :group_open do |data|
|
221
203
|
|
222
|
-
#
|
223
|
-
# @see https://api.slack.com/events/
|
224
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
225
|
-
# on :
|
204
|
+
# A private channel was renamed.
|
205
|
+
# @see https://api.slack.com/events/group_rename
|
206
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_rename.json
|
207
|
+
# on :group_rename do |data|
|
226
208
|
|
227
|
-
# A private
|
228
|
-
# @see https://api.slack.com/events/
|
229
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
230
|
-
# on :
|
209
|
+
# A private channel was unarchived.
|
210
|
+
# @see https://api.slack.com/events/group_unarchive
|
211
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_unarchive.json
|
212
|
+
# on :group_unarchive do |data|
|
231
213
|
|
232
|
-
#
|
233
|
-
# @see https://api.slack.com/events/
|
234
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
235
|
-
# on :
|
214
|
+
# The client has successfully connected to the server.
|
215
|
+
# @see https://api.slack.com/events/hello
|
216
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/hello.json
|
217
|
+
# on :hello do |data|
|
236
218
|
|
237
|
-
#
|
238
|
-
# @see https://api.slack.com/events/
|
239
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
240
|
-
# on :
|
219
|
+
# You closed a DM.
|
220
|
+
# @see https://api.slack.com/events/im_close
|
221
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_close.json
|
222
|
+
# on :im_close do |data|
|
241
223
|
|
242
|
-
# A
|
243
|
-
# @see https://api.slack.com/events/
|
244
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
245
|
-
# on :
|
224
|
+
# A DM was created.
|
225
|
+
# @see https://api.slack.com/events/im_created
|
226
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_created.json
|
227
|
+
# on :im_created do |data|
|
246
228
|
|
247
|
-
#
|
248
|
-
# @see https://api.slack.com/events/
|
249
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
250
|
-
# on :
|
229
|
+
# Bulk updates were made to a DM's history.
|
230
|
+
# @see https://api.slack.com/events/im_history_changed
|
231
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_history_changed.json
|
232
|
+
# on :im_history_changed do |data|
|
251
233
|
|
252
|
-
# A
|
253
|
-
# @see https://api.slack.com/events/
|
254
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
255
|
-
# on :
|
234
|
+
# A direct message read marker was updated.
|
235
|
+
# @see https://api.slack.com/events/im_marked
|
236
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_marked.json
|
237
|
+
# on :im_marked do |data|
|
256
238
|
|
257
|
-
#
|
258
|
-
# @see https://api.slack.com/events/
|
259
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
260
|
-
# on :
|
239
|
+
# You opened a DM.
|
240
|
+
# @see https://api.slack.com/events/im_open
|
241
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_open.json
|
242
|
+
# on :im_open do |data|
|
261
243
|
|
262
|
-
#
|
263
|
-
# @see https://api.slack.com/events/
|
264
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
265
|
-
# on :
|
244
|
+
# You manually updated your presence.
|
245
|
+
# @see https://api.slack.com/events/manual_presence_change
|
246
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/manual_presence_change.json
|
247
|
+
# on :manual_presence_change do |data|
|
266
248
|
|
267
|
-
# A
|
268
|
-
# @see https://api.slack.com/events/
|
269
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
270
|
-
# on :
|
249
|
+
# A user joined a public channel, private channel or MPDM..
|
250
|
+
# @see https://api.slack.com/events/member_joined_channel
|
251
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/member_joined_channel.json
|
252
|
+
# on :member_joined_channel do |data|
|
271
253
|
|
272
|
-
# A
|
273
|
-
# @see https://api.slack.com/events/
|
274
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
275
|
-
# on :
|
254
|
+
# A user left a public or private channel.
|
255
|
+
# @see https://api.slack.com/events/member_left_channel
|
256
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/member_left_channel.json
|
257
|
+
# on :member_left_channel do |data|
|
276
258
|
|
277
|
-
# A
|
278
|
-
# @see https://api.slack.com/events/
|
279
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
280
|
-
# on :
|
259
|
+
# A pin was added to a channel.
|
260
|
+
# @see https://api.slack.com/events/pin_added
|
261
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pin_added.json
|
262
|
+
# on :pin_added do |data|
|
281
263
|
|
282
|
-
# A
|
283
|
-
# @see https://api.slack.com/events/
|
284
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
285
|
-
# on :
|
264
|
+
# A pin was removed from a channel.
|
265
|
+
# @see https://api.slack.com/events/pin_removed
|
266
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pin_removed.json
|
267
|
+
# on :pin_removed do |data|
|
286
268
|
|
287
|
-
#
|
288
|
-
# @see https://api.slack.com/events/
|
289
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
290
|
-
|
269
|
+
# You have updated your preferences.
|
270
|
+
# @see https://api.slack.com/events/pref_change
|
271
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pref_change.json
|
272
|
+
on :pref_change do |data|
|
273
|
+
self.self.prefs ||= {}
|
274
|
+
self.self.prefs[data.name] = data.value
|
275
|
+
end
|
291
276
|
|
292
|
-
#
|
293
|
-
# @see https://api.slack.com/events/
|
294
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
295
|
-
# on :
|
277
|
+
# A member's presence changed.
|
278
|
+
# @see https://api.slack.com/events/presence_change
|
279
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_change.json
|
280
|
+
# on :presence_change do |data|
|
296
281
|
|
297
|
-
#
|
298
|
-
# @see https://api.slack.com/events/
|
299
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
300
|
-
# on :
|
282
|
+
# Determine the current presence status for a list of users.
|
283
|
+
# @see https://api.slack.com/events/presence_query
|
284
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_query.json
|
285
|
+
# on :presence_query do |data|
|
301
286
|
|
302
|
-
#
|
303
|
-
# @see https://api.slack.com/events/
|
304
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
305
|
-
# on :
|
287
|
+
# Subscribe to presence events for the specified users.
|
288
|
+
# @see https://api.slack.com/events/presence_sub
|
289
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_sub.json
|
290
|
+
# on :presence_sub do |data|
|
306
291
|
|
307
|
-
# A
|
308
|
-
# @see https://api.slack.com/events/
|
309
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
310
|
-
# on :
|
292
|
+
# A member has added an emoji reaction to an item.
|
293
|
+
# @see https://api.slack.com/events/reaction_added
|
294
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reaction_added.json
|
295
|
+
# on :reaction_added do |data|
|
311
296
|
|
312
|
-
#
|
313
|
-
# @see https://api.slack.com/events/
|
314
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
315
|
-
# on :
|
297
|
+
# A member removed an emoji reaction.
|
298
|
+
# @see https://api.slack.com/events/reaction_removed
|
299
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reaction_removed.json
|
300
|
+
# on :reaction_removed do |data|
|
316
301
|
|
317
|
-
#
|
318
|
-
# @see https://api.slack.com/events/
|
319
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
320
|
-
# on :
|
302
|
+
# Experimental.
|
303
|
+
# @see https://api.slack.com/events/reconnect_url
|
304
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reconnect_url.json
|
305
|
+
# on :reconnect_url do |data|
|
321
306
|
|
322
|
-
#
|
323
|
-
# @see https://api.slack.com/events/
|
324
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
325
|
-
# on :
|
307
|
+
# A shared channel invite was sent to a Slack user.
|
308
|
+
# @see https://api.slack.com/events/shared_channel_invite_received
|
309
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/shared_channel_invite_received.json
|
310
|
+
# on :shared_channel_invite_received do |data|
|
326
311
|
|
327
|
-
#
|
328
|
-
# @see https://api.slack.com/events/
|
329
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
330
|
-
# on :
|
312
|
+
# A member has starred an item.
|
313
|
+
# @see https://api.slack.com/events/star_added
|
314
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/star_added.json
|
315
|
+
# on :star_added do |data|
|
331
316
|
|
332
|
-
# A
|
333
|
-
# @see https://api.slack.com/events/
|
334
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
335
|
-
# on :
|
317
|
+
# A member removed a star.
|
318
|
+
# @see https://api.slack.com/events/star_removed
|
319
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/star_removed.json
|
320
|
+
# on :star_removed do |data|
|
336
321
|
|
337
|
-
# A
|
338
|
-
# @see https://api.slack.com/events/
|
339
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
340
|
-
# on :
|
322
|
+
# A User Group has been added to the workspace.
|
323
|
+
# @see https://api.slack.com/events/subteam_created
|
324
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_created.json
|
325
|
+
# on :subteam_created do |data|
|
341
326
|
|
342
|
-
#
|
343
|
-
# @see https://api.slack.com/events/
|
344
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
345
|
-
# on :
|
327
|
+
# The membership of an existing User Group has changed.
|
328
|
+
# @see https://api.slack.com/events/subteam_members_changed
|
329
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_members_changed.json
|
330
|
+
# on :subteam_members_changed do |data|
|
346
331
|
|
347
|
-
#
|
348
|
-
# @see https://api.slack.com/events/
|
349
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
350
|
-
# on :
|
332
|
+
# You have been added to a User Group.
|
333
|
+
# @see https://api.slack.com/events/subteam_self_added
|
334
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_self_added.json
|
335
|
+
# on :subteam_self_added do |data|
|
351
336
|
|
352
|
-
#
|
353
|
-
# @see https://api.slack.com/events/
|
354
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
355
|
-
# on :
|
337
|
+
# You have been removed from a User Group.
|
338
|
+
# @see https://api.slack.com/events/subteam_self_removed
|
339
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_self_removed.json
|
340
|
+
# on :subteam_self_removed do |data|
|
356
341
|
|
357
|
-
#
|
358
|
-
# @see https://api.slack.com/events/
|
359
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
360
|
-
# on :
|
342
|
+
# An existing User Group has been updated or its members changed.
|
343
|
+
# @see https://api.slack.com/events/subteam_updated
|
344
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_updated.json
|
345
|
+
# on :subteam_updated do |data|
|
361
346
|
|
362
|
-
# The
|
347
|
+
# The workspace domain has changed.
|
363
348
|
# @see https://api.slack.com/events/team_domain_change
|
364
349
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_domain_change.json
|
365
350
|
on :team_domain_change do |data|
|
@@ -367,19 +352,24 @@ module Slack
|
|
367
352
|
team.domain = data.domain
|
368
353
|
end
|
369
354
|
|
370
|
-
#
|
355
|
+
# A new member has joined.
|
356
|
+
# @see https://api.slack.com/events/team_join
|
357
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_join.json
|
358
|
+
# on :team_join do |data|
|
359
|
+
|
360
|
+
# The workspace is being migrated between servers.
|
371
361
|
# @see https://api.slack.com/events/team_migration_started
|
372
362
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_migration_started.json
|
373
363
|
# on :team_migration_started do |data|
|
374
364
|
|
375
|
-
# The
|
365
|
+
# The account billing plan has changed.
|
376
366
|
# @see https://api.slack.com/events/team_plan_change
|
377
367
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_plan_change.json
|
378
368
|
on :team_plan_change do |data|
|
379
369
|
team.plan = data.plan
|
380
370
|
end
|
381
371
|
|
382
|
-
# A
|
372
|
+
# A preference has been updated.
|
383
373
|
# @see https://api.slack.com/events/team_pref_change
|
384
374
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_pref_change.json
|
385
375
|
on :team_pref_change do |data|
|
@@ -387,34 +377,72 @@ module Slack
|
|
387
377
|
team.prefs[data.name] = data.value
|
388
378
|
end
|
389
379
|
|
390
|
-
#
|
380
|
+
# The workspace profile fields have been updated.
|
391
381
|
# @see https://api.slack.com/events/team_profile_change
|
392
382
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_change.json
|
393
383
|
# on :team_profile_change do |data|
|
394
384
|
|
395
|
-
#
|
385
|
+
# The workspace profile fields have been deleted.
|
396
386
|
# @see https://api.slack.com/events/team_profile_delete
|
397
387
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_delete.json
|
398
388
|
# on :team_profile_delete do |data|
|
399
389
|
|
400
|
-
#
|
390
|
+
# The workspace profile fields have been reordered.
|
401
391
|
# @see https://api.slack.com/events/team_profile_reorder
|
402
392
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_reorder.json
|
403
393
|
# on :team_profile_reorder do |data|
|
404
394
|
|
405
|
-
# The
|
395
|
+
# The workspace name has changed.
|
406
396
|
# @see https://api.slack.com/events/team_rename
|
407
397
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_rename.json
|
408
398
|
on :team_rename do |data|
|
409
399
|
team.name = data.name
|
410
400
|
end
|
411
401
|
|
412
|
-
#
|
413
|
-
# @see https://api.slack.com/events/
|
414
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/
|
415
|
-
on :
|
416
|
-
|
417
|
-
|
402
|
+
# A member's data has changed.
|
403
|
+
# @see https://api.slack.com/events/user_change
|
404
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_change.json
|
405
|
+
# on :user_change do |data|
|
406
|
+
|
407
|
+
# A user's huddle status has changed.
|
408
|
+
# @see https://api.slack.com/events/user_huddle_changed
|
409
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_huddle_changed.json
|
410
|
+
# on :user_huddle_changed do |data|
|
411
|
+
|
412
|
+
# A user's profile data has changed.
|
413
|
+
# @see https://api.slack.com/events/user_profile_changed
|
414
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_profile_changed.json
|
415
|
+
# on :user_profile_changed do |data|
|
416
|
+
|
417
|
+
# A user's status has changed.
|
418
|
+
# @see https://api.slack.com/events/user_status_changed
|
419
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_status_changed.json
|
420
|
+
# on :user_status_changed do |data|
|
421
|
+
|
422
|
+
# A channel member is typing a message.
|
423
|
+
# @see https://api.slack.com/events/user_typing
|
424
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_typing.json
|
425
|
+
# on :user_typing do |data|
|
426
|
+
|
427
|
+
# A message was posted in a multiparty direct message channel.
|
428
|
+
# @see https://api.slack.com/events/message.mpim
|
429
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.mpim.json
|
430
|
+
# on :message.mpim do |data|
|
431
|
+
|
432
|
+
# A message was posted in a direct message channel.
|
433
|
+
# @see https://api.slack.com/events/message.im
|
434
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.im.json
|
435
|
+
# on :message.im do |data|
|
436
|
+
|
437
|
+
# A message was posted to a private channel.
|
438
|
+
# @see https://api.slack.com/events/message.groups
|
439
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.groups.json
|
440
|
+
# on :message.groups do |data|
|
441
|
+
|
442
|
+
# A message was posted to a channel.
|
443
|
+
# @see https://api.slack.com/events/message.channels
|
444
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.channels.json
|
445
|
+
# on :message.channels do |data|
|
418
446
|
end
|
419
447
|
end
|
420
448
|
end
|