slack-ruby-client 0.11.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.coveralls.yml +2 -0
- data/.github/FUNDING.yml +2 -0
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/integration_test.yml +45 -0
- data/.github/workflows/lint.yml +14 -0
- data/.github/workflows/pr_lint.yml +21 -0
- data/.github/workflows/test.yml +56 -0
- data/.github/workflows/update_api.yml +81 -0
- data/.gitignore +7 -3
- data/.rubocop.yml +40 -2
- data/.rubocop_todo.yml +209 -55
- data/.ruby-version +1 -0
- data/CHANGELOG.md +257 -30
- data/CONTRIBUTING.md +44 -29
- data/Dangerfile +2 -0
- data/Gemfile +28 -6
- data/Gemfile.danger +6 -0
- data/LICENSE.md +1 -1
- data/README.md +473 -134
- data/RELEASING.md +2 -2
- data/Rakefile +2 -1
- data/SECURITY.md +9 -0
- data/UPGRADING.md +117 -3
- data/bin/commands/admin_analytics.rb +22 -0
- data/bin/commands/admin_apps.rb +57 -0
- data/bin/commands/admin_apps_activities.rb +32 -0
- data/bin/commands/admin_apps_approved.rb +24 -0
- data/bin/commands/admin_apps_config.rb +31 -0
- data/bin/commands/admin_apps_requests.rb +35 -0
- data/bin/commands/admin_apps_restricted.rb +24 -0
- data/bin/commands/admin_audit_anomaly_allow.rb +29 -0
- data/bin/commands/admin_auth_policy.rb +45 -0
- data/bin/commands/admin_barriers.rb +53 -0
- data/bin/commands/admin_conversations.rb +260 -0
- data/bin/commands/admin_conversations_ekm.rb +23 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +43 -0
- data/bin/commands/admin_emoji.rb +60 -0
- data/bin/commands/admin_functions.rb +23 -0
- data/bin/commands/admin_functions_permissions.rb +31 -0
- data/bin/commands/admin_inviteRequests.rb +42 -0
- data/bin/commands/admin_inviteRequests_approved.rb +22 -0
- data/bin/commands/admin_inviteRequests_denied.rb +22 -0
- data/bin/commands/admin_roles.rb +46 -0
- data/bin/commands/admin_teams.rb +33 -0
- data/bin/commands/admin_teams_admins.rb +22 -0
- data/bin/commands/admin_teams_owners.rb +22 -0
- data/bin/commands/admin_teams_settings.rb +70 -0
- data/bin/commands/admin_usergroups.rb +54 -0
- data/bin/commands/admin_users.rb +106 -0
- data/bin/commands/admin_users_session.rb +84 -0
- data/bin/commands/admin_users_unsupportedVersions.rb +21 -0
- data/bin/commands/admin_workflows.rb +42 -0
- data/bin/commands/admin_workflows_collaborators.rb +31 -0
- data/bin/commands/admin_workflows_permissions.rb +21 -0
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +31 -0
- data/bin/commands/api.rb +15 -9
- data/bin/commands/apps.rb +21 -0
- data/bin/commands/apps_activities.rb +32 -0
- data/bin/commands/apps_auth_external.rb +32 -0
- data/bin/commands/apps_connections.rb +19 -0
- data/bin/commands/apps_datastore.rb +116 -0
- data/bin/commands/apps_event_authorizations.rb +22 -0
- data/bin/commands/apps_manifest.rb +58 -0
- data/bin/commands/assistant_search.rb +27 -0
- data/bin/commands/assistant_threads.rb +45 -0
- data/bin/commands/auth.rb +22 -15
- data/bin/commands/auth_teams.rb +22 -0
- data/bin/commands/bookmarks.rb +60 -0
- data/bin/commands/bots.rb +16 -8
- data/bin/commands/calls.rb +58 -0
- data/bin/commands/calls_participants.rb +31 -0
- data/bin/commands/canvases.rb +41 -0
- data/bin/commands/canvases_access.rb +34 -0
- data/bin/commands/canvases_sections.rb +21 -0
- data/bin/commands/chat.rb +158 -99
- data/bin/commands/chat_scheduledMessages.rb +25 -0
- data/bin/commands/conversations.rb +241 -157
- data/bin/commands/conversations_canvases.rb +22 -0
- data/bin/commands/conversations_externalInvitePermissions.rb +22 -0
- data/bin/commands/conversations_requestSharedInvite.rb +48 -0
- data/bin/commands/dialog.rb +16 -9
- data/bin/commands/dnd.rb +47 -38
- data/bin/commands/emoji.rb +15 -7
- data/bin/commands/files.rb +113 -87
- data/bin/commands/files_comments.rb +16 -30
- data/bin/commands/files_remote.rb +84 -0
- data/bin/commands/functions.rb +31 -0
- data/bin/commands/functions_distributions_permissions.rb +61 -0
- data/bin/commands/functions_workflows_steps.rb +23 -0
- data/bin/commands/functions_workflows_steps_responses.rb +23 -0
- data/bin/commands/migration.rb +17 -9
- data/bin/commands/oauth.rb +19 -24
- data/bin/commands/oauth_v2.rb +35 -0
- data/bin/commands/openid_connect.rb +33 -0
- data/bin/commands/pins.rb +33 -30
- data/bin/commands/reactions.rb +53 -45
- data/bin/commands/reminders.rb +54 -41
- data/bin/commands/rtm.rb +16 -22
- data/bin/commands/search.rb +44 -33
- data/bin/commands/stars.rb +39 -29
- data/bin/commands/team.rb +50 -34
- data/bin/commands/team_billing.rb +19 -0
- data/bin/commands/team_externalTeams.rb +35 -0
- data/bin/commands/team_preferences.rb +19 -0
- data/bin/commands/team_profile.rb +15 -8
- data/bin/commands/tooling_tokens.rb +20 -0
- data/bin/commands/usergroups.rb +69 -53
- data/bin/commands/usergroups_users.rb +30 -19
- data/bin/commands/users.rb +114 -84
- data/bin/commands/users_admin.rb +29 -22
- data/bin/commands/users_discoverableContacts.rb +20 -0
- data/bin/commands/users_prefs.rb +14 -7
- data/bin/commands/users_profile.rb +27 -20
- data/bin/commands/views.rb +56 -0
- data/bin/commands/workflows.rb +44 -0
- data/bin/commands/workflows_triggers_permissions.rb +60 -0
- data/bin/slack +50 -46
- data/examples/files_upload_v2/.env.example +1 -0
- data/examples/{hi_real_time → files_upload_v2}/Gemfile +2 -2
- data/examples/files_upload_v2/README.md +13 -0
- data/examples/files_upload_v2/files_upload_v2.rb +45 -0
- 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_eventmachine → hi_real_time_async_async}/Gemfile +2 -1
- data/examples/{hi_real_time_async_eventmachine → hi_real_time_async_async}/hi.rb +12 -7
- 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/examples/oauth_v2/.env.example +4 -0
- data/examples/oauth_v2/Gemfile +7 -0
- data/examples/oauth_v2/README.md +33 -0
- data/examples/oauth_v2/oauth_v2.rb +60 -0
- data/lib/slack/config.rb +2 -2
- data/lib/slack/events/config.rb +32 -0
- data/lib/slack/events/request.rb +76 -0
- data/lib/slack/logger.rb +6 -5
- data/lib/slack/messages/formatting.rb +66 -1
- 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 +117 -54
- data/lib/slack/real_time/concurrency/async.rb +142 -0
- data/lib/slack/real_time/concurrency.rb +2 -2
- data/lib/slack/real_time/config.rb +12 -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 +49 -17
- data/lib/slack/real_time/stores/base.rb +28 -14
- data/lib/slack/real_time/stores/starter.rb +325 -287
- data/lib/slack/real_time/stores/store.rb +271 -186
- data/lib/slack/real_time/stores.rb +2 -7
- data/lib/slack/utils/security.rb +44 -0
- 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_activities.rb +53 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +37 -0
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +40 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +53 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +37 -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 +397 -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_functions.rb +36 -0
- data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +41 -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_roles.rb +73 -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 +167 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +121 -0
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
- data/lib/slack/web/api/endpoints/admin_workflows.rb +67 -0
- data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +42 -0
- data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +26 -0
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +41 -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_activities.rb +54 -0
- data/lib/slack/web/api/endpoints/apps_auth_external.rb +41 -0
- data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
- data/lib/slack/web/api/endpoints/apps_datastore.rb +181 -0
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
- data/lib/slack/web/api/endpoints/apps_manifest.rb +79 -0
- data/lib/slack/web/api/endpoints/assistant_search.rb +44 -0
- data/lib/slack/web/api/endpoints/assistant_threads.rb +68 -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 +90 -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/canvases.rb +54 -0
- data/lib/slack/web/api/endpoints/canvases_access.rb +47 -0
- data/lib/slack/web/api/endpoints/canvases_sections.rb +27 -0
- data/lib/slack/web/api/endpoints/chat.rb +172 -87
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
- data/lib/slack/web/api/endpoints/conversations.rb +190 -64
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +28 -0
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +31 -0
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +73 -0
- data/lib/slack/web/api/endpoints/dialog.rb +6 -10
- data/lib/slack/web/api/endpoints/dnd.rb +11 -5
- data/lib/slack/web/api/endpoints/emoji.rb +3 -0
- data/lib/slack/web/api/endpoints/files.rb +85 -36
- 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/functions.rb +43 -0
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +84 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +30 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +30 -0
- data/lib/slack/web/api/endpoints/migration.rb +6 -3
- data/lib/slack/web/api/endpoints/oauth.rb +10 -32
- 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 +31 -20
- data/lib/slack/web/api/endpoints/reminders.rb +25 -12
- data/lib/slack/web/api/endpoints/rtm.rb +4 -22
- data/lib/slack/web/api/endpoints/search.rb +33 -18
- data/lib/slack/web/api/endpoints/stars.rb +23 -10
- data/lib/slack/web/api/endpoints/team.rb +38 -7
- data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +53 -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 +44 -25
- data/lib/slack/web/api/endpoints/usergroups_users.rb +23 -14
- data/lib/slack/web/api/endpoints/users.rb +57 -18
- data/lib/slack/web/api/endpoints/users_admin.rb +5 -2
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +24 -0
- data/lib/slack/web/api/endpoints/users_prefs.rb +2 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +11 -9
- data/lib/slack/web/api/endpoints/views.rb +86 -0
- data/lib/slack/web/api/endpoints/workflows.rb +63 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +87 -0
- data/lib/slack/web/api/endpoints.rb +136 -12
- 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 +1396 -0
- data/lib/slack/web/api/helpers/files.rb +97 -0
- data/lib/slack/web/api/helpers.rb +13 -0
- data/lib/slack/web/api/mixins/conversations.id.rb +47 -0
- data/lib/slack/web/api/mixins/ids.id.rb +4 -3
- data/lib/slack/web/api/mixins/users.id.rb +18 -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/options.rb +26 -0
- data/lib/slack/web/api/patches/.gitkeep +0 -0
- data/lib/slack/web/api/templates/command.erb +19 -12
- 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 +23 -3
- data/lib/slack/web/api/templates/method_spec.erb +40 -3
- data/lib/slack/web/client.rb +4 -1
- data/lib/slack/web/config.rb +9 -2
- data/lib/slack/web/faraday/connection.rb +11 -20
- data/lib/slack/web/faraday/options.rb +24 -0
- data/lib/slack/web/faraday/request.rb +6 -1
- data/lib/slack/web/faraday/response/raise_error.rb +14 -8
- 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 +18 -6
- 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 +43 -17
- data/slack-ruby-client.gemspec +10 -14
- metadata +191 -307
- data/.travis.yml +0 -30
- data/bin/commands/apps_permissions.rb +0 -22
- data/bin/commands/channels.rb +0 -175
- data/bin/commands/groups.rb +0 -172
- data/bin/commands/im.rb +0 -67
- data/bin/commands/mpim.rb +0 -63
- data/bin/commands.rb +0 -33
- 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/hi.rb +0 -36
- data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
- data/lib/slack/real_time/concurrency/celluloid.rb +0 -117
- data/lib/slack/real_time/concurrency/eventmachine.rb +0 -60
- data/lib/slack/web/api/endpoints/apps_permissions.rb +0 -35
- data/lib/slack/web/api/endpoints/channels.rb +0 -265
- data/lib/slack/web/api/endpoints/groups.rb +0 -255
- data/lib/slack/web/api/endpoints/im.rb +0 -113
- data/lib/slack/web/api/endpoints/mpim.rb +0 -98
- 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/channels.id.rb +0 -26
- 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/dialog.1.open-json-support.patch +0 -17
- data/lib/slack/web/api/templates/commands.erb +0 -5
- data/screenshots/register-bot.png +0 -0
- data/spec/fixtures/slack/web/429_error.yml +0 -85
- data/spec/fixtures/slack/web/auth_test_error.yml +0 -48
- data/spec/fixtures/slack/web/auth_test_success.yml +0 -57
- 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/paginated_users_list.yml +0 -181
- data/spec/fixtures/slack/web/rtm_connect.yml +0 -70
- data/spec/fixtures/slack/web/rtm_start.yml +0 -104
- data/spec/fixtures/slack/web/users_info.yml +0 -130
- data/spec/fixtures/slack/web/users_list.yml +0 -72
- data/spec/integration/integration_spec.rb +0 -139
- data/spec/slack/config_spec.rb +0 -14
- data/spec/slack/messages/formatting_spec.rb +0 -43
- data/spec/slack/real_time/api/message_spec.rb +0 -15
- data/spec/slack/real_time/api/ping_spec.rb +0 -15
- data/spec/slack/real_time/api/typing_spec.rb +0 -15
- data/spec/slack/real_time/client_spec.rb +0 -425
- data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -62
- data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -47
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +0 -19
- data/spec/slack/real_time/event_handlers/bot_spec.rb +0 -44
- data/spec/slack/real_time/event_handlers/channel_spec.rb +0 -116
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +0 -15
- data/spec/slack/real_time/event_handlers/group_spec.rb +0 -90
- data/spec/slack/real_time/event_handlers/im_spec.rb +0 -47
- data/spec/slack/real_time/event_handlers/team_spec.rb +0 -62
- data/spec/slack/real_time/event_handlers/user_spec.rb +0 -63
- data/spec/slack/real_time/rtm_connect_spec.rb +0 -13
- data/spec/slack/real_time/rtm_start_spec.rb +0 -13
- data/spec/slack/real_time/store_spec.rb +0 -11
- data/spec/slack/slack_spec.rb +0 -58
- data/spec/slack/version_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/api_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -15
- data/spec/slack/web/api/endpoints/bots_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -100
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +0 -25
- data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +0 -105
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +0 -28
- data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +0 -33
- data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -12
- data/spec/slack/web/api/endpoints/emoji_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +0 -34
- data/spec/slack/web/api/endpoints/files_spec.rb +0 -43
- data/spec/slack/web/api/endpoints/im_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/migration_spec.rb +0 -12
- data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -29
- data/spec/slack/web/api/endpoints/pins_spec.rb +0 -22
- data/spec/slack/web/api/endpoints/reactions_spec.rb +0 -17
- data/spec/slack/web/api/endpoints/reminders_spec.rb +0 -30
- data/spec/slack/web/api/endpoints/rtm_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/search_spec.rb +0 -22
- data/spec/slack/web/api/endpoints/stars_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/team_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +0 -27
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +0 -20
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +0 -17
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +0 -7
- data/spec/slack/web/api/error_spec.rb +0 -14
- data/spec/slack/web/api/errors/slack_error_spec.rb +0 -14
- data/spec/slack/web/api/mixins/channels_spec.rb +0 -31
- data/spec/slack/web/api/mixins/groups_spec.rb +0 -31
- data/spec/slack/web/api/mixins/users_spec.rb +0 -39
- data/spec/slack/web/api/pagination/cursor_spec.rb +0 -70
- data/spec/slack/web/client_spec.rb +0 -174
- data/spec/spec_helper.rb +0 -14
- data/spec/support/queue_with_timeout.rb +0 -34
- data/spec/support/real_time/concurrency/mock.rb +0 -30
- data/spec/support/real_time/connected_client.rb +0 -21
- data/spec/support/real_time/event.rb +0 -11
- data/spec/support/token.rb +0 -10
- data/spec/support/vcr.rb +0 -9
- /data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/Procfile +0 -0
@@ -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
|
@@ -24,7 +25,8 @@ module Slack
|
|
24
25
|
# Invite a guest that can use one channel only
|
25
26
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.admin/users.admin.invite.json
|
26
27
|
def users_admin_invite(options = {})
|
27
|
-
|
28
|
+
raise ArgumentError, 'Required arguments :email missing' if options[:email].nil?
|
29
|
+
logger.warn('The users.admin.invite method is undocumented.')
|
28
30
|
post('users.admin.invite', options)
|
29
31
|
end
|
30
32
|
|
@@ -35,8 +37,9 @@ module Slack
|
|
35
37
|
# User to disable
|
36
38
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.admin/users.admin.setInactive.json
|
37
39
|
def users_admin_setInactive(options = {})
|
38
|
-
|
40
|
+
raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
|
39
41
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
42
|
+
logger.warn('The users.admin.setInactive method is undocumented.')
|
40
43
|
post('users.admin.setInactive', options)
|
41
44
|
end
|
42
45
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module UsersDiscoverablecontacts
|
9
|
+
#
|
10
|
+
# Look up an email address to see if someone is discoverable on Slack
|
11
|
+
#
|
12
|
+
# @option options [string] :email
|
13
|
+
# .
|
14
|
+
# @see https://api.slack.com/methods/users.discoverableContacts.lookup
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users.discoverableContacts/users.discoverableContacts.lookup.json
|
16
|
+
def users_discoverableContacts_lookup(options = {})
|
17
|
+
raise ArgumentError, 'Required arguments :email missing' if options[:email].nil?
|
18
|
+
post('users.discoverableContacts.lookup', options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
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,7 @@ module Slack
|
|
10
11
|
#
|
11
12
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.prefs/users.prefs.get.json
|
12
13
|
def users_prefs_get(options = {})
|
14
|
+
logger.warn('The users.prefs.get method is undocumented.')
|
13
15
|
post('users.prefs.get', options)
|
14
16
|
end
|
15
17
|
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
|
@@ -6,10 +7,10 @@ module Slack
|
|
6
7
|
module Endpoints
|
7
8
|
module UsersProfile
|
8
9
|
#
|
9
|
-
#
|
10
|
+
# Retrieve a user's profile information, including their custom status.
|
10
11
|
#
|
11
|
-
# @option options [
|
12
|
-
# Include labels for each ID in custom profile fields.
|
12
|
+
# @option options [boolean] :include_labels
|
13
|
+
# Include labels for each ID in custom profile fields. Using this parameter will heavily rate-limit your requests and is not recommended.
|
13
14
|
# @option options [user] :user
|
14
15
|
# User to retrieve profile info for.
|
15
16
|
# @see https://api.slack.com/methods/users.profile.get
|
@@ -20,20 +21,21 @@ module Slack
|
|
20
21
|
end
|
21
22
|
|
22
23
|
#
|
23
|
-
# Set
|
24
|
+
# Set a user's profile information, including custom status.
|
24
25
|
#
|
25
|
-
# @option options [
|
26
|
+
# @option options [string] :name
|
26
27
|
# Name of a single key to set. Usable only if profile is not passed.
|
27
|
-
# @option options [
|
28
|
-
# Collection of key:value pairs presented as a URL-encoded JSON hash.
|
28
|
+
# @option options [string] :profile
|
29
|
+
# Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.
|
29
30
|
# @option options [user] :user
|
30
|
-
# ID of user to change. This argument may only be specified by
|
31
|
-
# @option options [
|
31
|
+
# ID of user to change. This argument may only be specified by admins on paid teams.
|
32
|
+
# @option options [string] :value
|
32
33
|
# Value to set a single key to. Usable only if profile is not passed.
|
33
34
|
# @see https://api.slack.com/methods/users.profile.set
|
34
35
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users.profile/users.profile.set.json
|
35
36
|
def users_profile_set(options = {})
|
36
37
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
38
|
+
options = encode_options_as_json(options, %i[profile])
|
37
39
|
post('users.profile.set', options)
|
38
40
|
end
|
39
41
|
end
|
@@ -0,0 +1,86 @@
|
|
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 Views
|
9
|
+
#
|
10
|
+
# Open a view for a user.
|
11
|
+
#
|
12
|
+
# @option options [view as string] :view
|
13
|
+
# A view payload. This must be a JSON-encoded string.
|
14
|
+
# @option options [string] :trigger_id
|
15
|
+
# Exchange a trigger to post to the user.
|
16
|
+
# @option options [string] :interactivity_pointer
|
17
|
+
# Exchange an interactivity pointer to post to the user.
|
18
|
+
# @see https://api.slack.com/methods/views.open
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/views/views.open.json
|
20
|
+
def views_open(options = {})
|
21
|
+
raise ArgumentError, 'Required arguments :view missing' if options[:view].nil?
|
22
|
+
raise ArgumentError, 'Exactly one of :trigger_id, :interactivity_pointer is required' unless options[:trigger_id].nil? ^ options[:interactivity_pointer].nil?
|
23
|
+
options = encode_options_as_json(options, %i[view])
|
24
|
+
post('views.open', options)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Publish a static view for a User.
|
29
|
+
#
|
30
|
+
# @option options [string] :user_id
|
31
|
+
# id of the user you want publish a view to.
|
32
|
+
# @option options [view as string] :view
|
33
|
+
# A view payload. This must be a JSON-encoded string.
|
34
|
+
# @option options [string] :hash
|
35
|
+
# A string that represents view state to protect against possible race conditions.
|
36
|
+
# @see https://api.slack.com/methods/views.publish
|
37
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/views/views.publish.json
|
38
|
+
def views_publish(options = {})
|
39
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
40
|
+
raise ArgumentError, 'Required arguments :view missing' if options[:view].nil?
|
41
|
+
options = encode_options_as_json(options, %i[view])
|
42
|
+
post('views.publish', options)
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Push a view onto the stack of a root view.
|
47
|
+
#
|
48
|
+
# @option options [view as string] :view
|
49
|
+
# A view payload. This must be a JSON-encoded string.
|
50
|
+
# @option options [string] :trigger_id
|
51
|
+
# Exchange a trigger to post to the user.
|
52
|
+
# @option options [string] :interactivity_pointer
|
53
|
+
# Exchange an interactivity pointer to post to the user.
|
54
|
+
# @see https://api.slack.com/methods/views.push
|
55
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/views/views.push.json
|
56
|
+
def views_push(options = {})
|
57
|
+
raise ArgumentError, 'Required arguments :view missing' if options[:view].nil?
|
58
|
+
raise ArgumentError, 'Exactly one of :trigger_id, :interactivity_pointer is required' unless options[:trigger_id].nil? ^ options[:interactivity_pointer].nil?
|
59
|
+
options = encode_options_as_json(options, %i[view])
|
60
|
+
post('views.push', options)
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# Update an existing view.
|
65
|
+
#
|
66
|
+
# @option options [view as string] :view
|
67
|
+
# A view object. This must be a JSON-encoded string.
|
68
|
+
# @option options [string] :external_id
|
69
|
+
# A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Either view_id or external_id is required.
|
70
|
+
# @option options [string] :view_id
|
71
|
+
# A unique identifier of the view to be updated. Either view_id or external_id is required.
|
72
|
+
# @option options [string] :hash
|
73
|
+
# A string that represents view state to protect against possible race conditions.
|
74
|
+
# @see https://api.slack.com/methods/views.update
|
75
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/views/views.update.json
|
76
|
+
def views_update(options = {})
|
77
|
+
raise ArgumentError, 'Required arguments :view missing' if options[:view].nil?
|
78
|
+
raise ArgumentError, 'Exactly one of :external_id, :view_id is required' unless options[:external_id].nil? ^ options[:view_id].nil?
|
79
|
+
options = encode_options_as_json(options, %i[view])
|
80
|
+
post('views.update', options)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,63 @@
|
|
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 Workflows
|
9
|
+
#
|
10
|
+
# Indicate that an app's step in a workflow completed execution.
|
11
|
+
#
|
12
|
+
# @option options [string] :workflow_step_execute_id
|
13
|
+
# Context identifier that maps to the correct workflow step execution.
|
14
|
+
# @option options [object] :outputs
|
15
|
+
# Key-value object of outputs from your step. Keys of this object reflect the configured key properties of your outputs array from your workflow_step object.
|
16
|
+
# @see https://api.slack.com/methods/workflows.stepCompleted
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows/workflows.stepCompleted.json
|
18
|
+
def workflows_stepCompleted(options = {})
|
19
|
+
raise ArgumentError, 'Required arguments :workflow_step_execute_id missing' if options[:workflow_step_execute_id].nil?
|
20
|
+
post('workflows.stepCompleted', options)
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# Indicate that an app's step in a workflow failed to execute.
|
25
|
+
#
|
26
|
+
# @option options [object] :error
|
27
|
+
# A JSON-based object with a message property that should contain a human readable error message.
|
28
|
+
# @option options [string] :workflow_step_execute_id
|
29
|
+
# Context identifier that maps to the correct workflow step execution.
|
30
|
+
# @see https://api.slack.com/methods/workflows.stepFailed
|
31
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows/workflows.stepFailed.json
|
32
|
+
def workflows_stepFailed(options = {})
|
33
|
+
raise ArgumentError, 'Required arguments :error missing' if options[:error].nil?
|
34
|
+
raise ArgumentError, 'Required arguments :workflow_step_execute_id missing' if options[:workflow_step_execute_id].nil?
|
35
|
+
options = encode_options_as_json(options, %i[error])
|
36
|
+
post('workflows.stepFailed', options)
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Update the configuration for a workflow step.
|
41
|
+
#
|
42
|
+
# @option options [string] :workflow_step_edit_id
|
43
|
+
# A context identifier provided with view_submission payloads used to call back to workflows.updateStep.
|
44
|
+
# @option options [object] :inputs
|
45
|
+
# A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. Please note: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. Read more about variables in workflow steps here.
|
46
|
+
# @option options [array] :outputs
|
47
|
+
# An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.
|
48
|
+
# @option options [string] :step_image_url
|
49
|
+
# An optional field that can be used to override app image that is shown in the Workflow Builder.
|
50
|
+
# @option options [string] :step_name
|
51
|
+
# An optional field that can be used to override the step name that is shown in the Workflow Builder.
|
52
|
+
# @see https://api.slack.com/methods/workflows.updateStep
|
53
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows/workflows.updateStep.json
|
54
|
+
def workflows_updateStep(options = {})
|
55
|
+
raise ArgumentError, 'Required arguments :workflow_step_edit_id missing' if options[:workflow_step_edit_id].nil?
|
56
|
+
options = encode_options_as_json(options, %i[inputs outputs])
|
57
|
+
post('workflows.updateStep', options)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,87 @@
|
|
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 WorkflowsTriggersPermissions
|
9
|
+
#
|
10
|
+
# Allows users to run a trigger that has its permission type set to named_entities
|
11
|
+
#
|
12
|
+
# @option options [string] :trigger_id
|
13
|
+
# Encoded ID of the trigger.
|
14
|
+
# @option options [array] :channel_ids
|
15
|
+
# List of encoded channel IDs.
|
16
|
+
# @option options [array] :org_ids
|
17
|
+
# List of encoded organization IDs.
|
18
|
+
# @option options [array] :team_ids
|
19
|
+
# List of encoded workspace IDs.
|
20
|
+
# @option options [array] :user_ids
|
21
|
+
# List of encoded user IDs.
|
22
|
+
# @see https://api.slack.com/methods/workflows.triggers.permissions.add
|
23
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.add.json
|
24
|
+
def workflows_triggers_permissions_add(options = {})
|
25
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
26
|
+
post('workflows.triggers.permissions.add', options)
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# Returns the permission type of a trigger and if applicable, includes the entities that have been granted access
|
31
|
+
#
|
32
|
+
# @option options [string] :trigger_id
|
33
|
+
# Encoded ID of the trigger.
|
34
|
+
# @see https://api.slack.com/methods/workflows.triggers.permissions.list
|
35
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.list.json
|
36
|
+
def workflows_triggers_permissions_list(options = {})
|
37
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
38
|
+
post('workflows.triggers.permissions.list', options)
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Revoke an entity's access to a trigger that has its permission type set to named_entities
|
43
|
+
#
|
44
|
+
# @option options [string] :trigger_id
|
45
|
+
# Encoded ID of the trigger.
|
46
|
+
# @option options [array] :channel_ids
|
47
|
+
# List of encoded channel IDs.
|
48
|
+
# @option options [array] :org_ids
|
49
|
+
# List of encoded organization IDs.
|
50
|
+
# @option options [array] :team_ids
|
51
|
+
# List of encoded workspace IDs.
|
52
|
+
# @option options [array] :user_ids
|
53
|
+
# List of encoded user IDs.
|
54
|
+
# @see https://api.slack.com/methods/workflows.triggers.permissions.remove
|
55
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.remove.json
|
56
|
+
def workflows_triggers_permissions_remove(options = {})
|
57
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
58
|
+
post('workflows.triggers.permissions.remove', options)
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Set the permission type for who can run a trigger
|
63
|
+
#
|
64
|
+
# @option options [enum] :permission_type
|
65
|
+
# The type of permission that defines who can run a trigger.
|
66
|
+
# @option options [string] :trigger_id
|
67
|
+
# Encoded ID of the trigger.
|
68
|
+
# @option options [array] :channel_ids
|
69
|
+
# List of encoded channel IDs.
|
70
|
+
# @option options [array] :org_ids
|
71
|
+
# List of encoded organization IDs.
|
72
|
+
# @option options [array] :team_ids
|
73
|
+
# List of encoded workspace IDs.
|
74
|
+
# @option options [array] :user_ids
|
75
|
+
# List of encoded user IDs.
|
76
|
+
# @see https://api.slack.com/methods/workflows.triggers.permissions.set
|
77
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.set.json
|
78
|
+
def workflows_triggers_permissions_set(options = {})
|
79
|
+
raise ArgumentError, 'Required arguments :permission_type missing' if options[:permission_type].nil?
|
80
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
81
|
+
post('workflows.triggers.permissions.set', options)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -1,22 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
4
|
+
require_relative 'endpoints/admin_analytics'
|
5
|
+
require_relative 'endpoints/admin_apps'
|
6
|
+
require_relative 'endpoints/admin_apps_activities'
|
7
|
+
require_relative 'endpoints/admin_apps_approved'
|
8
|
+
require_relative 'endpoints/admin_apps_config'
|
9
|
+
require_relative 'endpoints/admin_apps_requests'
|
10
|
+
require_relative 'endpoints/admin_apps_restricted'
|
11
|
+
require_relative 'endpoints/admin_audit_anomaly_allow'
|
12
|
+
require_relative 'endpoints/admin_auth_policy'
|
13
|
+
require_relative 'endpoints/admin_barriers'
|
14
|
+
require_relative 'endpoints/admin_conversations'
|
15
|
+
require_relative 'endpoints/admin_conversations_ekm'
|
16
|
+
require_relative 'endpoints/admin_conversations_restrictAccess'
|
17
|
+
require_relative 'endpoints/admin_emoji'
|
18
|
+
require_relative 'endpoints/admin_functions'
|
19
|
+
require_relative 'endpoints/admin_functions_permissions'
|
20
|
+
require_relative 'endpoints/admin_inviteRequests'
|
21
|
+
require_relative 'endpoints/admin_inviteRequests_approved'
|
22
|
+
require_relative 'endpoints/admin_inviteRequests_denied'
|
23
|
+
require_relative 'endpoints/admin_roles'
|
24
|
+
require_relative 'endpoints/admin_teams'
|
25
|
+
require_relative 'endpoints/admin_teams_admins'
|
26
|
+
require_relative 'endpoints/admin_teams_owners'
|
27
|
+
require_relative 'endpoints/admin_teams_settings'
|
28
|
+
require_relative 'endpoints/admin_usergroups'
|
29
|
+
require_relative 'endpoints/admin_users'
|
30
|
+
require_relative 'endpoints/admin_users_session'
|
31
|
+
require_relative 'endpoints/admin_users_unsupportedVersions'
|
32
|
+
require_relative 'endpoints/admin_workflows'
|
33
|
+
require_relative 'endpoints/admin_workflows_collaborators'
|
34
|
+
require_relative 'endpoints/admin_workflows_permissions'
|
35
|
+
require_relative 'endpoints/admin_workflows_triggers_types_permissions'
|
3
36
|
require_relative 'endpoints/api'
|
4
|
-
require_relative 'endpoints/
|
37
|
+
require_relative 'endpoints/apps'
|
38
|
+
require_relative 'endpoints/apps_activities'
|
39
|
+
require_relative 'endpoints/apps_auth_external'
|
40
|
+
require_relative 'endpoints/apps_connections'
|
41
|
+
require_relative 'endpoints/apps_datastore'
|
42
|
+
require_relative 'endpoints/apps_event_authorizations'
|
43
|
+
require_relative 'endpoints/apps_manifest'
|
44
|
+
require_relative 'endpoints/assistant_search'
|
45
|
+
require_relative 'endpoints/assistant_threads'
|
5
46
|
require_relative 'endpoints/auth'
|
47
|
+
require_relative 'endpoints/auth_teams'
|
48
|
+
require_relative 'endpoints/bookmarks'
|
6
49
|
require_relative 'endpoints/bots'
|
7
|
-
require_relative 'endpoints/
|
50
|
+
require_relative 'endpoints/calls'
|
51
|
+
require_relative 'endpoints/calls_participants'
|
52
|
+
require_relative 'endpoints/canvases'
|
53
|
+
require_relative 'endpoints/canvases_access'
|
54
|
+
require_relative 'endpoints/canvases_sections'
|
8
55
|
require_relative 'endpoints/chat'
|
56
|
+
require_relative 'endpoints/chat_scheduledMessages'
|
9
57
|
require_relative 'endpoints/conversations'
|
58
|
+
require_relative 'endpoints/conversations_canvases'
|
59
|
+
require_relative 'endpoints/conversations_externalInvitePermissions'
|
60
|
+
require_relative 'endpoints/conversations_requestSharedInvite'
|
10
61
|
require_relative 'endpoints/dialog'
|
11
62
|
require_relative 'endpoints/dnd'
|
12
63
|
require_relative 'endpoints/emoji'
|
13
64
|
require_relative 'endpoints/files'
|
14
65
|
require_relative 'endpoints/files_comments'
|
15
|
-
require_relative 'endpoints/
|
16
|
-
require_relative 'endpoints/
|
66
|
+
require_relative 'endpoints/files_remote'
|
67
|
+
require_relative 'endpoints/functions'
|
68
|
+
require_relative 'endpoints/functions_distributions_permissions'
|
69
|
+
require_relative 'endpoints/functions_workflows_steps'
|
70
|
+
require_relative 'endpoints/functions_workflows_steps_responses'
|
17
71
|
require_relative 'endpoints/migration'
|
18
|
-
require_relative 'endpoints/mpim'
|
19
72
|
require_relative 'endpoints/oauth'
|
73
|
+
require_relative 'endpoints/oauth_v2'
|
74
|
+
require_relative 'endpoints/openid_connect'
|
20
75
|
require_relative 'endpoints/pins'
|
21
76
|
require_relative 'endpoints/reactions'
|
22
77
|
require_relative 'endpoints/reminders'
|
@@ -24,39 +79,100 @@ require_relative 'endpoints/rtm'
|
|
24
79
|
require_relative 'endpoints/search'
|
25
80
|
require_relative 'endpoints/stars'
|
26
81
|
require_relative 'endpoints/team'
|
82
|
+
require_relative 'endpoints/team_billing'
|
83
|
+
require_relative 'endpoints/team_externalTeams'
|
84
|
+
require_relative 'endpoints/team_preferences'
|
27
85
|
require_relative 'endpoints/team_profile'
|
86
|
+
require_relative 'endpoints/tooling_tokens'
|
28
87
|
require_relative 'endpoints/usergroups'
|
29
88
|
require_relative 'endpoints/usergroups_users'
|
30
89
|
require_relative 'endpoints/users'
|
31
90
|
require_relative 'endpoints/users_admin'
|
91
|
+
require_relative 'endpoints/users_discoverableContacts'
|
32
92
|
require_relative 'endpoints/users_prefs'
|
33
93
|
require_relative 'endpoints/users_profile'
|
94
|
+
require_relative 'endpoints/views'
|
95
|
+
require_relative 'endpoints/workflows'
|
96
|
+
require_relative 'endpoints/workflows_triggers_permissions'
|
34
97
|
|
35
98
|
module Slack
|
36
99
|
module Web
|
37
100
|
module Api
|
38
101
|
module Endpoints
|
39
|
-
include Slack::Web::Api::Mixins::
|
102
|
+
include Slack::Web::Api::Mixins::Conversations
|
40
103
|
include Slack::Web::Api::Mixins::Users
|
41
|
-
include Slack::Web::Api::Mixins::Groups
|
42
104
|
|
105
|
+
include AdminAnalytics
|
106
|
+
include AdminApps
|
107
|
+
include AdminAppsActivities
|
108
|
+
include AdminAppsApproved
|
109
|
+
include AdminAppsConfig
|
110
|
+
include AdminAppsRequests
|
111
|
+
include AdminAppsRestricted
|
112
|
+
include AdminAuditAnomalyAllow
|
113
|
+
include AdminAuthPolicy
|
114
|
+
include AdminBarriers
|
115
|
+
include AdminConversations
|
116
|
+
include AdminConversationsEkm
|
117
|
+
include AdminConversationsRestrictaccess
|
118
|
+
include AdminEmoji
|
119
|
+
include AdminFunctions
|
120
|
+
include AdminFunctionsPermissions
|
121
|
+
include AdminInviterequests
|
122
|
+
include AdminInviterequestsApproved
|
123
|
+
include AdminInviterequestsDenied
|
124
|
+
include AdminRoles
|
125
|
+
include AdminTeams
|
126
|
+
include AdminTeamsAdmins
|
127
|
+
include AdminTeamsOwners
|
128
|
+
include AdminTeamsSettings
|
129
|
+
include AdminUsergroups
|
130
|
+
include AdminUsers
|
131
|
+
include AdminUsersSession
|
132
|
+
include AdminUsersUnsupportedversions
|
133
|
+
include AdminWorkflows
|
134
|
+
include AdminWorkflowsCollaborators
|
135
|
+
include AdminWorkflowsPermissions
|
136
|
+
include AdminWorkflowsTriggersTypesPermissions
|
43
137
|
include Api
|
44
|
-
include
|
138
|
+
include Apps
|
139
|
+
include AppsActivities
|
140
|
+
include AppsAuthExternal
|
141
|
+
include AppsConnections
|
142
|
+
include AppsDatastore
|
143
|
+
include AppsEventAuthorizations
|
144
|
+
include AppsManifest
|
145
|
+
include AssistantSearch
|
146
|
+
include AssistantThreads
|
45
147
|
include Auth
|
148
|
+
include AuthTeams
|
149
|
+
include Bookmarks
|
46
150
|
include Bots
|
47
|
-
include
|
151
|
+
include Calls
|
152
|
+
include CallsParticipants
|
153
|
+
include Canvases
|
154
|
+
include CanvasesAccess
|
155
|
+
include CanvasesSections
|
48
156
|
include Chat
|
157
|
+
include ChatScheduledmessages
|
49
158
|
include Conversations
|
159
|
+
include ConversationsCanvases
|
160
|
+
include ConversationsExternalinvitepermissions
|
161
|
+
include ConversationsRequestsharedinvite
|
50
162
|
include Dialog
|
51
163
|
include Dnd
|
52
164
|
include Emoji
|
53
165
|
include Files
|
54
166
|
include FilesComments
|
55
|
-
include
|
56
|
-
include
|
167
|
+
include FilesRemote
|
168
|
+
include Functions
|
169
|
+
include FunctionsDistributionsPermissions
|
170
|
+
include FunctionsWorkflowsSteps
|
171
|
+
include FunctionsWorkflowsStepsResponses
|
57
172
|
include Migration
|
58
|
-
include Mpim
|
59
173
|
include Oauth
|
174
|
+
include OauthV2
|
175
|
+
include OpenidConnect
|
60
176
|
include Pins
|
61
177
|
include Reactions
|
62
178
|
include Reminders
|
@@ -64,13 +180,21 @@ module Slack
|
|
64
180
|
include Search
|
65
181
|
include Stars
|
66
182
|
include Team
|
183
|
+
include TeamBilling
|
184
|
+
include TeamExternalteams
|
185
|
+
include TeamPreferences
|
67
186
|
include TeamProfile
|
187
|
+
include ToolingTokens
|
68
188
|
include Usergroups
|
69
189
|
include UsergroupsUsers
|
70
190
|
include Users
|
71
191
|
include UsersAdmin
|
192
|
+
include UsersDiscoverablecontacts
|
72
193
|
include UsersPrefs
|
73
194
|
include UsersProfile
|
195
|
+
include Views
|
196
|
+
include Workflows
|
197
|
+
include WorkflowsTriggersPermissions
|
74
198
|
end
|
75
199
|
end
|
76
200
|
end
|
data/lib/slack/web/api/error.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Slack
|
3
|
+
module Web
|
4
|
+
module Api
|
5
|
+
module Errors
|
6
|
+
class ServerError < ::Faraday::Error
|
7
|
+
attr_reader :response
|
8
|
+
|
9
|
+
def initialize(message, response)
|
10
|
+
@response = response
|
11
|
+
super message
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class ParsingError < ServerError
|
16
|
+
def initialize(response)
|
17
|
+
super('parsing_error', response)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class HttpRequestError < ServerError; end
|
22
|
+
|
23
|
+
class TimeoutError < HttpRequestError
|
24
|
+
def initialize(response)
|
25
|
+
super('timeout_error', response)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class UnavailableError < HttpRequestError
|
30
|
+
def initialize(response)
|
31
|
+
super('unavailable_error', response)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Slack
|
2
3
|
module Web
|
3
4
|
module Api
|
@@ -6,8 +7,20 @@ module Slack
|
|
6
7
|
attr_reader :response
|
7
8
|
|
8
9
|
def initialize(message, response = nil)
|
9
|
-
@response = response
|
10
10
|
super message
|
11
|
+
@response = response
|
12
|
+
end
|
13
|
+
|
14
|
+
def error
|
15
|
+
response.body.error
|
16
|
+
end
|
17
|
+
|
18
|
+
def errors
|
19
|
+
response.body.errors
|
20
|
+
end
|
21
|
+
|
22
|
+
def response_metadata
|
23
|
+
response.body.response_metadata
|
11
24
|
end
|
12
25
|
end
|
13
26
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Slack
|
2
3
|
module Web
|
3
4
|
module Api
|
@@ -7,10 +8,7 @@ module Slack
|
|
7
8
|
|
8
9
|
def initialize(response)
|
9
10
|
@response = response
|
10
|
-
|
11
|
-
|
12
|
-
def message
|
13
|
-
"Retry after #{retry_after} seconds"
|
11
|
+
super "Retry after #{retry_after} seconds"
|
14
12
|
end
|
15
13
|
|
16
14
|
def retry_after
|