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
|
@@ -8,14 +9,16 @@ module Slack
|
|
8
9
|
#
|
9
10
|
# For Enterprise Grid workspaces, map local user IDs to global user IDs
|
10
11
|
#
|
11
|
-
# @option options [
|
12
|
+
# @option options [array] :users
|
12
13
|
# A comma-separated list of user ids, up to 400 per request.
|
13
|
-
# @option options [
|
14
|
+
# @option options [string] :team_id
|
15
|
+
# Specify team_id starts with T in case of Org Token.
|
16
|
+
# @option options [boolean] :to_old
|
14
17
|
# Specify true to convert W global user IDs to workspace-specific U IDs. Defaults to false.
|
15
18
|
# @see https://api.slack.com/methods/migration.exchange
|
16
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/migration/migration.exchange.json
|
17
20
|
def migration_exchange(options = {})
|
18
|
-
|
21
|
+
raise ArgumentError, 'Required arguments :users missing' if options[:users].nil?
|
19
22
|
post('migration.exchange', options)
|
20
23
|
end
|
21
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
|
@@ -6,46 +7,23 @@ module Slack
|
|
6
7
|
module Endpoints
|
7
8
|
module Oauth
|
8
9
|
#
|
9
|
-
# Exchanges a temporary OAuth code for an
|
10
|
+
# Exchanges a temporary OAuth verifier code for an access token.
|
10
11
|
#
|
11
|
-
# @option options [
|
12
|
-
# Issued when you created your application.
|
13
|
-
# @option options [
|
14
|
-
# Issued when you created your application.
|
15
|
-
# @option options [
|
12
|
+
# @option options [string] :client_id
|
13
|
+
# Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.
|
14
|
+
# @option options [string] :client_secret
|
15
|
+
# Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.
|
16
|
+
# @option options [string] :code
|
16
17
|
# The code param returned via the OAuth callback.
|
17
|
-
# @option options [
|
18
|
+
# @option options [string] :redirect_uri
|
18
19
|
# This must match the originally submitted URI (if one was sent).
|
20
|
+
# @option options [boolean] :single_channel
|
21
|
+
# Request the user to add your app only to a single channel. Only valid with a legacy workspace app.
|
19
22
|
# @see https://api.slack.com/methods/oauth.access
|
20
23
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth/oauth.access.json
|
21
24
|
def oauth_access(options = {})
|
22
|
-
throw ArgumentError.new('Required arguments :client_id missing') if options[:client_id].nil?
|
23
|
-
throw ArgumentError.new('Required arguments :client_secret missing') if options[:client_secret].nil?
|
24
|
-
throw ArgumentError.new('Required arguments :code missing') if options[:code].nil?
|
25
25
|
post('oauth.access', options)
|
26
26
|
end
|
27
|
-
|
28
|
-
#
|
29
|
-
# Exchanges a temporary OAuth verifier code for a workspace token.
|
30
|
-
#
|
31
|
-
# @option options [Object] :client_id
|
32
|
-
# Issued when you created your application.
|
33
|
-
# @option options [Object] :client_secret
|
34
|
-
# Issued when you created your application.
|
35
|
-
# @option options [Object] :code
|
36
|
-
# The code param returned via the OAuth callback.
|
37
|
-
# @option options [Object] :redirect_uri
|
38
|
-
# This must match the originally submitted URI (if one was sent).
|
39
|
-
# @option options [Object] :single_channel
|
40
|
-
# Request the user to add your app only to a single channel.
|
41
|
-
# @see https://api.slack.com/methods/oauth.token
|
42
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth/oauth.token.json
|
43
|
-
def oauth_token(options = {})
|
44
|
-
throw ArgumentError.new('Required arguments :client_id missing') if options[:client_id].nil?
|
45
|
-
throw ArgumentError.new('Required arguments :client_secret missing') if options[:client_secret].nil?
|
46
|
-
throw ArgumentError.new('Required arguments :code missing') if options[:code].nil?
|
47
|
-
post('oauth.token', options)
|
48
|
-
end
|
49
27
|
end
|
50
28
|
end
|
51
29
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module OauthV2
|
9
|
+
#
|
10
|
+
# Exchanges a temporary OAuth verifier code for an access token.
|
11
|
+
#
|
12
|
+
# @option options [string] :client_id
|
13
|
+
# Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.
|
14
|
+
# @option options [string] :client_secret
|
15
|
+
# Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.
|
16
|
+
# @option options [string] :code
|
17
|
+
# The code param returned via the OAuth callback.
|
18
|
+
# @option options [string] :grant_type
|
19
|
+
# The grant_type param as described in the OAuth spec.
|
20
|
+
# @option options [string] :redirect_uri
|
21
|
+
# This must match the originally submitted URI (if one was sent).
|
22
|
+
# @option options [string] :refresh_token
|
23
|
+
# The refresh_token param as described in the OAuth spec.
|
24
|
+
# @see https://api.slack.com/methods/oauth.v2.access
|
25
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.access.json
|
26
|
+
def oauth_v2_access(options = {})
|
27
|
+
post('oauth.v2.access', options)
|
28
|
+
end
|
29
|
+
|
30
|
+
#
|
31
|
+
# Exchanges a legacy access token for a new expiring access token and refresh token
|
32
|
+
#
|
33
|
+
# @option options [string] :client_id
|
34
|
+
# Issued when you created your application.
|
35
|
+
# @option options [string] :client_secret
|
36
|
+
# Issued when you created your application.
|
37
|
+
# @see https://api.slack.com/methods/oauth.v2.exchange
|
38
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.exchange.json
|
39
|
+
def oauth_v2_exchange(options = {})
|
40
|
+
raise ArgumentError, 'Required arguments :client_id missing' if options[:client_id].nil?
|
41
|
+
raise ArgumentError, 'Required arguments :client_secret missing' if options[:client_secret].nil?
|
42
|
+
post('oauth.v2.exchange', options)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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 OpenidConnect
|
9
|
+
#
|
10
|
+
# Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack.
|
11
|
+
#
|
12
|
+
# @option options [string] :client_id
|
13
|
+
# Issued when you created your application.
|
14
|
+
# @option options [string] :client_secret
|
15
|
+
# Issued when you created your application.
|
16
|
+
# @option options [string] :code
|
17
|
+
# The code param returned via the OAuth callback.
|
18
|
+
# @option options [enum] :grant_type
|
19
|
+
# The grant_type param as described in the OAuth spec.
|
20
|
+
# @option options [string] :redirect_uri
|
21
|
+
# This must match the originally submitted URI (if one was sent).
|
22
|
+
# @option options [string] :refresh_token
|
23
|
+
# The refresh_token param as described in the OAuth spec.
|
24
|
+
# @see https://api.slack.com/methods/openid.connect.token
|
25
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/openid.connect/openid.connect.token.json
|
26
|
+
def openid_connect_token(options = {})
|
27
|
+
post('openid.connect.token', options)
|
28
|
+
end
|
29
|
+
|
30
|
+
#
|
31
|
+
# Get the identity of a user who has authorized Sign in with Slack.
|
32
|
+
#
|
33
|
+
# @see https://api.slack.com/methods/openid.connect.userInfo
|
34
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/openid.connect/openid.connect.userInfo.json
|
35
|
+
def openid_connect_userInfo(options = {})
|
36
|
+
post('openid.connect.userInfo', options)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
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
|
@@ -9,18 +10,14 @@ module Slack
|
|
9
10
|
# Pins an item to a channel.
|
10
11
|
#
|
11
12
|
# @option options [channel] :channel
|
12
|
-
# Channel to pin the
|
13
|
-
# @option options [
|
14
|
-
#
|
15
|
-
# @option options [Object] :file_comment
|
16
|
-
# File comment to pin.
|
17
|
-
# @option options [Object] :timestamp
|
18
|
-
# Timestamp of the message to pin.
|
13
|
+
# Channel to pin the messsage to. You must also include a timestamp when pinning messages.
|
14
|
+
# @option options [string] :timestamp
|
15
|
+
# Timestamp of the message to pin. You must also include the channel.
|
19
16
|
# @see https://api.slack.com/methods/pins.add
|
20
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.add.json
|
21
18
|
def pins_add(options = {})
|
22
|
-
|
23
|
-
options = options.merge(channel:
|
19
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
20
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
24
21
|
post('pins.add', options)
|
25
22
|
end
|
26
23
|
|
@@ -32,8 +29,8 @@ module Slack
|
|
32
29
|
# @see https://api.slack.com/methods/pins.list
|
33
30
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.list.json
|
34
31
|
def pins_list(options = {})
|
35
|
-
|
36
|
-
options = options.merge(channel:
|
32
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
33
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
37
34
|
post('pins.list', options)
|
38
35
|
end
|
39
36
|
|
@@ -42,17 +39,13 @@ module Slack
|
|
42
39
|
#
|
43
40
|
# @option options [channel] :channel
|
44
41
|
# Channel where the item is pinned to.
|
45
|
-
# @option options [
|
46
|
-
# File to un-pin.
|
47
|
-
# @option options [Object] :file_comment
|
48
|
-
# File comment to un-pin.
|
49
|
-
# @option options [Object] :timestamp
|
42
|
+
# @option options [string] :timestamp
|
50
43
|
# Timestamp of the message to un-pin.
|
51
44
|
# @see https://api.slack.com/methods/pins.remove
|
52
45
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.remove.json
|
53
46
|
def pins_remove(options = {})
|
54
|
-
|
55
|
-
options = options.merge(channel:
|
47
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
48
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
56
49
|
post('pins.remove', options)
|
57
50
|
end
|
58
51
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -8,21 +9,19 @@ module Slack
|
|
8
9
|
#
|
9
10
|
# Adds a reaction to an item.
|
10
11
|
#
|
11
|
-
# @option options [Object] :name
|
12
|
-
# Reaction (emoji) name.
|
13
12
|
# @option options [channel] :channel
|
14
13
|
# Channel where the message to add reaction to was posted.
|
15
|
-
# @option options [
|
16
|
-
#
|
17
|
-
# @option options [
|
18
|
-
# File comment to add reaction to.
|
19
|
-
# @option options [Object] :timestamp
|
14
|
+
# @option options [string] :name
|
15
|
+
# Reaction (emoji) name.
|
16
|
+
# @option options [string] :timestamp
|
20
17
|
# Timestamp of the message to add reaction to.
|
21
18
|
# @see https://api.slack.com/methods/reactions.add
|
22
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.add.json
|
23
20
|
def reactions_add(options = {})
|
24
|
-
|
25
|
-
|
21
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
22
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
23
|
+
raise ArgumentError, 'Required arguments :timestamp missing' if options[:timestamp].nil?
|
24
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
26
25
|
post('reactions.add', options)
|
27
26
|
end
|
28
27
|
|
@@ -33,51 +32,63 @@ module Slack
|
|
33
32
|
# Channel where the message to get reactions for was posted.
|
34
33
|
# @option options [file] :file
|
35
34
|
# File to get reactions for.
|
36
|
-
# @option options [
|
35
|
+
# @option options [string] :file_comment
|
37
36
|
# File comment to get reactions for.
|
38
|
-
# @option options [
|
37
|
+
# @option options [boolean] :full
|
39
38
|
# If true always return the complete reaction list.
|
40
|
-
# @option options [
|
39
|
+
# @option options [string] :timestamp
|
41
40
|
# Timestamp of the message to get reactions for.
|
42
41
|
# @see https://api.slack.com/methods/reactions.get
|
43
42
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.get.json
|
44
43
|
def reactions_get(options = {})
|
45
|
-
options = options.merge(channel:
|
44
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
46
45
|
post('reactions.get', options)
|
47
46
|
end
|
48
47
|
|
49
48
|
#
|
50
49
|
# Lists reactions made by a user.
|
51
50
|
#
|
52
|
-
# @option options [
|
51
|
+
# @option options [string] :cursor
|
52
|
+
# Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details.
|
53
|
+
# @option options [boolean] :full
|
53
54
|
# If true always return the complete reaction list.
|
55
|
+
# @option options [integer] :limit
|
56
|
+
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.
|
57
|
+
# @option options [string] :team_id
|
58
|
+
# encoded team id to list reactions in, required if org token is used.
|
54
59
|
# @option options [user] :user
|
55
60
|
# Show reactions made by this user. Defaults to the authed user.
|
56
61
|
# @see https://api.slack.com/methods/reactions.list
|
57
62
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.list.json
|
58
63
|
def reactions_list(options = {})
|
59
64
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
60
|
-
|
65
|
+
if block_given?
|
66
|
+
Pagination::Cursor.new(self, :reactions_list, options).each do |page|
|
67
|
+
yield page
|
68
|
+
end
|
69
|
+
else
|
70
|
+
post('reactions.list', options)
|
71
|
+
end
|
61
72
|
end
|
62
73
|
|
63
74
|
#
|
64
75
|
# Removes a reaction from an item.
|
65
76
|
#
|
66
|
-
# @option options [
|
77
|
+
# @option options [string] :name
|
67
78
|
# Reaction (emoji) name.
|
68
79
|
# @option options [channel] :channel
|
69
80
|
# Channel where the message to remove reaction from was posted.
|
70
81
|
# @option options [file] :file
|
71
82
|
# File to remove reaction from.
|
72
|
-
# @option options [
|
83
|
+
# @option options [string] :file_comment
|
73
84
|
# File comment to remove reaction from.
|
74
|
-
# @option options [
|
85
|
+
# @option options [string] :timestamp
|
75
86
|
# Timestamp of the message to remove reaction from.
|
76
87
|
# @see https://api.slack.com/methods/reactions.remove
|
77
88
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.remove.json
|
78
89
|
def reactions_remove(options = {})
|
79
|
-
|
80
|
-
options = options.merge(channel:
|
90
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
91
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
81
92
|
post('reactions.remove', options)
|
82
93
|
end
|
83
94
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -8,17 +9,21 @@ module Slack
|
|
8
9
|
#
|
9
10
|
# Creates a reminder.
|
10
11
|
#
|
11
|
-
# @option options [
|
12
|
+
# @option options [string] :text
|
12
13
|
# The content of the reminder.
|
13
|
-
# @option options [
|
14
|
-
# When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").
|
14
|
+
# @option options [string] :time
|
15
|
+
# Can also take a type of integer. When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").
|
16
|
+
# @option options [object] :recurrence
|
17
|
+
# Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week.
|
18
|
+
# @option options [string] :team_id
|
19
|
+
# Encoded team id, required if org token is used.
|
15
20
|
# @option options [user] :user
|
16
|
-
#
|
21
|
+
# No longer supported - reminders cannot be set for other users. Previously, was the user who would receive the reminder.
|
17
22
|
# @see https://api.slack.com/methods/reminders.add
|
18
23
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.add.json
|
19
24
|
def reminders_add(options = {})
|
20
|
-
|
21
|
-
|
25
|
+
raise ArgumentError, 'Required arguments :text missing' if options[:text].nil?
|
26
|
+
raise ArgumentError, 'Required arguments :time missing' if options[:time].nil?
|
22
27
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
23
28
|
post('reminders.add', options)
|
24
29
|
end
|
@@ -26,42 +31,50 @@ module Slack
|
|
26
31
|
#
|
27
32
|
# Marks a reminder as complete.
|
28
33
|
#
|
29
|
-
# @option options [
|
34
|
+
# @option options [string] :reminder
|
30
35
|
# The ID of the reminder to be marked as complete.
|
36
|
+
# @option options [string] :team_id
|
37
|
+
# Encoded team id, required if org token is used.
|
31
38
|
# @see https://api.slack.com/methods/reminders.complete
|
32
39
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.complete.json
|
33
40
|
def reminders_complete(options = {})
|
34
|
-
|
41
|
+
raise ArgumentError, 'Required arguments :reminder missing' if options[:reminder].nil?
|
35
42
|
post('reminders.complete', options)
|
36
43
|
end
|
37
44
|
|
38
45
|
#
|
39
46
|
# Deletes a reminder.
|
40
47
|
#
|
41
|
-
# @option options [
|
48
|
+
# @option options [string] :reminder
|
42
49
|
# The ID of the reminder.
|
50
|
+
# @option options [string] :team_id
|
51
|
+
# Encoded team id, required if org token is used.
|
43
52
|
# @see https://api.slack.com/methods/reminders.delete
|
44
53
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.delete.json
|
45
54
|
def reminders_delete(options = {})
|
46
|
-
|
55
|
+
raise ArgumentError, 'Required arguments :reminder missing' if options[:reminder].nil?
|
47
56
|
post('reminders.delete', options)
|
48
57
|
end
|
49
58
|
|
50
59
|
#
|
51
60
|
# Gets information about a reminder.
|
52
61
|
#
|
53
|
-
# @option options [
|
62
|
+
# @option options [string] :reminder
|
54
63
|
# The ID of the reminder.
|
64
|
+
# @option options [string] :team_id
|
65
|
+
# Encoded team id, required if org token is passed.
|
55
66
|
# @see https://api.slack.com/methods/reminders.info
|
56
67
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.info.json
|
57
68
|
def reminders_info(options = {})
|
58
|
-
|
69
|
+
raise ArgumentError, 'Required arguments :reminder missing' if options[:reminder].nil?
|
59
70
|
post('reminders.info', options)
|
60
71
|
end
|
61
72
|
|
62
73
|
#
|
63
74
|
# Lists all reminders created by or for a given user.
|
64
75
|
#
|
76
|
+
# @option options [string] :team_id
|
77
|
+
# Encoded team id, required if org token is passed.
|
65
78
|
# @see https://api.slack.com/methods/reminders.list
|
66
79
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.list.json
|
67
80
|
def reminders_list(options = {})
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -8,34 +9,15 @@ module Slack
|
|
8
9
|
#
|
9
10
|
# Starts a Real Time Messaging session.
|
10
11
|
#
|
11
|
-
# @option options [
|
12
|
+
# @option options [boolean] :batch_presence_aware
|
13
|
+
# Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.
|
14
|
+
# @option options [boolean] :presence_sub
|
12
15
|
# Only deliver presence events when requested by subscription. See presence subscriptions.
|
13
16
|
# @see https://api.slack.com/methods/rtm.connect
|
14
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/rtm/rtm.connect.json
|
15
18
|
def rtm_connect(options = {})
|
16
19
|
post('rtm.connect', options)
|
17
20
|
end
|
18
|
-
|
19
|
-
#
|
20
|
-
# Starts a Real Time Messaging session.
|
21
|
-
#
|
22
|
-
# @option options [Object] :batch_presence_aware
|
23
|
-
# Only deliver presence events when requested by subscription. See presence subscriptions.
|
24
|
-
# @option options [Object] :include_locale
|
25
|
-
# Set this to true to receive the locale for users and channels. Defaults to false.
|
26
|
-
# @option options [Object] :mpim_aware
|
27
|
-
# Returns MPIMs to the client in the API response.
|
28
|
-
# @option options [Object] :no_latest
|
29
|
-
# Exclude latest timestamps for channels, groups, mpims, and ims. Automatically sets no_unreads to 1.
|
30
|
-
# @option options [Object] :no_unreads
|
31
|
-
# Skip unread counts for each channel (improves performance).
|
32
|
-
# @option options [Object] :simple_latest
|
33
|
-
# Return timestamp only for latest message object of each channel (improves performance).
|
34
|
-
# @see https://api.slack.com/methods/rtm.start
|
35
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/rtm/rtm.start.json
|
36
|
-
def rtm_start(options = {})
|
37
|
-
post('rtm.start', options)
|
38
|
-
end
|
39
21
|
end
|
40
22
|
end
|
41
23
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -8,55 +9,69 @@ module Slack
|
|
8
9
|
#
|
9
10
|
# Searches for messages and files matching a query.
|
10
11
|
#
|
11
|
-
# @option options [
|
12
|
+
# @option options [string] :query
|
12
13
|
# Search query. May contains booleans, etc.
|
13
|
-
# @option options [
|
14
|
+
# @option options [boolean] :highlight
|
14
15
|
# Pass a value of true to enable query highlight markers (see below).
|
15
|
-
# @option options [
|
16
|
+
# @option options [string] :sort
|
16
17
|
# Return matches sorted by either score or timestamp.
|
17
|
-
# @option options [
|
18
|
+
# @option options [enum] :sort_dir
|
18
19
|
# Change sort direction to ascending (asc) or descending (desc).
|
20
|
+
# @option options [string] :team_id
|
21
|
+
# encoded team id to search in, required if org token is used.
|
19
22
|
# @see https://api.slack.com/methods/search.all
|
20
23
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.all.json
|
21
24
|
def search_all(options = {})
|
22
|
-
|
25
|
+
raise ArgumentError, 'Required arguments :query missing' if options[:query].nil?
|
23
26
|
post('search.all', options)
|
24
27
|
end
|
25
28
|
|
26
29
|
#
|
27
30
|
# Searches for files matching a query.
|
28
31
|
#
|
29
|
-
# @option options [
|
30
|
-
# Search query.
|
31
|
-
# @option options [
|
32
|
+
# @option options [string] :query
|
33
|
+
# Search query.
|
34
|
+
# @option options [boolean] :highlight
|
32
35
|
# Pass a value of true to enable query highlight markers (see below).
|
33
|
-
# @option options [
|
36
|
+
# @option options [string] :sort
|
34
37
|
# Return matches sorted by either score or timestamp.
|
35
|
-
# @option options [
|
38
|
+
# @option options [enum] :sort_dir
|
36
39
|
# Change sort direction to ascending (asc) or descending (desc).
|
40
|
+
# @option options [string] :team_id
|
41
|
+
# encoded team id to search in, required if org token is used.
|
37
42
|
# @see https://api.slack.com/methods/search.files
|
38
43
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.files.json
|
39
44
|
def search_files(options = {})
|
40
|
-
|
45
|
+
raise ArgumentError, 'Required arguments :query missing' if options[:query].nil?
|
41
46
|
post('search.files', options)
|
42
47
|
end
|
43
48
|
|
44
49
|
#
|
45
50
|
# Searches for messages matching a query.
|
46
51
|
#
|
47
|
-
# @option options [
|
48
|
-
# Search query.
|
49
|
-
# @option options [
|
52
|
+
# @option options [string] :query
|
53
|
+
# Search query.
|
54
|
+
# @option options [string] :cursor
|
55
|
+
# Use this when getting results with cursormark pagination. For first call send * for subsequent calls, send the value of next_cursor returned in the previous call's results.
|
56
|
+
# @option options [boolean] :highlight
|
50
57
|
# Pass a value of true to enable query highlight markers (see below).
|
51
|
-
# @option options [
|
58
|
+
# @option options [string] :sort
|
52
59
|
# Return matches sorted by either score or timestamp.
|
53
|
-
# @option options [
|
60
|
+
# @option options [enum] :sort_dir
|
54
61
|
# Change sort direction to ascending (asc) or descending (desc).
|
62
|
+
# @option options [string] :team_id
|
63
|
+
# encoded team id to search in, required if org token is used.
|
55
64
|
# @see https://api.slack.com/methods/search.messages
|
56
65
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.messages.json
|
57
66
|
def search_messages(options = {})
|
58
|
-
|
59
|
-
|
67
|
+
raise ArgumentError, 'Required arguments :query missing' if options[:query].nil?
|
68
|
+
if block_given?
|
69
|
+
Pagination::Cursor.new(self, :search_messages, options).each do |page|
|
70
|
+
yield page
|
71
|
+
end
|
72
|
+
else
|
73
|
+
post('search.messages', options)
|
74
|
+
end
|
60
75
|
end
|
61
76
|
end
|
62
77
|
end
|