slack-ruby-client 0.16.0 → 1.1.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 +4 -4
- data/.github/workflows/danger.yml +19 -0
- data/.github/workflows/integtest.yml +25 -0
- data/.github/workflows/rubocop.yml +13 -0
- data/.github/workflows/test.yml +34 -0
- data/.gitignore +5 -3
- data/.rubocop.yml +6 -0
- data/.rubocop_todo.yml +137 -43
- data/CHANGELOG.md +34 -3
- data/CONTRIBUTING.md +4 -4
- data/Gemfile +18 -1
- data/Gemfile.danger +6 -0
- data/LICENSE.md +1 -1
- data/README.md +13 -12
- data/RELEASING.md +1 -1
- data/UPGRADING.md +42 -0
- data/bin/commands/admin_analytics.rb +2 -1
- data/bin/commands/admin_apps.rb +11 -0
- data/bin/commands/admin_apps_requests.rb +12 -0
- data/bin/commands/admin_auth_policy.rb +39 -0
- data/bin/commands/admin_conversations.rb +2 -1
- data/bin/commands/admin_conversations_restrictAccess.rb +1 -1
- data/bin/commands/admin_emoji.rb +2 -2
- data/bin/commands/admin_teams.rb +1 -1
- data/bin/commands/admin_users.rb +1 -0
- data/bin/commands/admin_users_session.rb +40 -0
- data/bin/commands/admin_users_unsupportedVersions.rb +15 -0
- data/bin/commands/apps_manifest.rb +52 -0
- data/bin/commands/bookmarks.rb +52 -0
- data/bin/commands/channels.rb +0 -157
- data/bin/commands/chat.rb +14 -9
- data/bin/commands/conversations.rb +61 -4
- data/bin/commands/dnd.rb +3 -1
- data/bin/commands/files.rb +2 -1
- data/bin/commands/groups.rb +0 -163
- data/bin/commands/im.rb +0 -62
- data/bin/commands/mpim.rb +0 -60
- data/bin/commands/oauth.rb +0 -13
- data/bin/commands/oauth_v2.rb +13 -1
- data/bin/commands/openid_connect.rb +27 -0
- data/bin/commands/pins.rb +2 -2
- data/bin/commands/reminders.rb +6 -0
- data/bin/commands/rtm.rb +2 -2
- data/bin/commands/search.rb +2 -1
- data/bin/commands/stars.rb +7 -6
- data/bin/commands/team.rb +1 -0
- data/bin/commands/team_billing.rb +13 -0
- data/bin/commands/team_preferences.rb +13 -0
- data/bin/commands/tooling_tokens.rb +14 -0
- data/bin/commands/usergroups.rb +1 -1
- data/bin/commands/users.rb +1 -1
- data/bin/commands/views.rb +1 -1
- data/bin/commands.rb +8 -9
- data/lib/slack/config.rb +1 -2
- data/lib/slack/events/request.rb +5 -3
- data/lib/slack/real_time/client.rb +6 -7
- data/lib/slack/real_time/concurrency/async.rb +6 -8
- data/lib/slack/real_time/config.rb +3 -13
- data/lib/slack/real_time/socket.rb +1 -2
- data/lib/slack/real_time/stores/base.rb +1 -6
- data/lib/slack/real_time/stores/starter.rb +6 -3
- data/lib/slack/real_time/stores/store.rb +5 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +5 -3
- data/lib/slack/web/api/endpoints/admin_apps.rb +21 -5
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +20 -2
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_conversations.rb +28 -26
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
- data/lib/slack/web/api/endpoints/admin_emoji.rb +11 -11
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +7 -7
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams.rb +7 -7
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +10 -10
- data/lib/slack/web/api/endpoints/admin_users.rb +20 -18
- data/lib/slack/web/api/endpoints/admin_users_session.rb +65 -9
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
- data/lib/slack/web/api/endpoints/api.rb +1 -1
- data/lib/slack/web/api/endpoints/apps.rb +2 -2
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +3 -3
- data/lib/slack/web/api/endpoints/apps_manifest.rb +77 -0
- data/lib/slack/web/api/endpoints/auth.rb +1 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +3 -3
- data/lib/slack/web/api/endpoints/bookmarks.rb +86 -0
- data/lib/slack/web/api/endpoints/bots.rb +2 -2
- data/lib/slack/web/api/endpoints/calls.rb +15 -15
- data/lib/slack/web/api/endpoints/calls_participants.rb +4 -4
- data/lib/slack/web/api/endpoints/channels.rb +0 -265
- data/lib/slack/web/api/endpoints/chat.rb +67 -57
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +3 -3
- data/lib/slack/web/api/endpoints/conversations.rb +117 -27
- data/lib/slack/web/api/endpoints/dialog.rb +2 -2
- data/lib/slack/web/api/endpoints/dnd.rb +6 -3
- data/lib/slack/web/api/endpoints/files.rb +16 -14
- data/lib/slack/web/api/endpoints/files_comments.rb +1 -1
- data/lib/slack/web/api/endpoints/files_remote.rb +20 -20
- data/lib/slack/web/api/endpoints/groups.rb +0 -273
- data/lib/slack/web/api/endpoints/im.rb +0 -107
- data/lib/slack/web/api/endpoints/migration.rb +3 -3
- data/lib/slack/web/api/endpoints/mpim.rb +0 -102
- data/lib/slack/web/api/endpoints/oauth.rb +5 -27
- data/lib/slack/web/api/endpoints/oauth_v2.rb +24 -6
- data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
- data/lib/slack/web/api/endpoints/pins.rb +4 -4
- data/lib/slack/web/api/endpoints/reactions.rb +12 -12
- data/lib/slack/web/api/endpoints/reminders.rb +17 -5
- data/lib/slack/web/api/endpoints/rtm.rb +10 -10
- data/lib/slack/web/api/endpoints/search.rb +24 -16
- data/lib/slack/web/api/endpoints/stars.rb +11 -9
- data/lib/slack/web/api/endpoints/team.rb +10 -8
- data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
- data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +1 -1
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +19 -19
- data/lib/slack/web/api/endpoints/usergroups_users.rb +7 -7
- data/lib/slack/web/api/endpoints/users.rb +16 -16
- data/lib/slack/web/api/endpoints/users_profile.rb +4 -4
- data/lib/slack/web/api/endpoints/views.rb +12 -12
- data/lib/slack/web/api/endpoints/workflows.rb +9 -9
- data/lib/slack/web/api/endpoints.rb +16 -20
- data/lib/slack/web/api/errors/server_error.rb +37 -0
- data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -4
- data/lib/slack/web/api/errors.rb +232 -16
- data/lib/slack/web/api/mixins.rb +0 -2
- data/lib/slack/web/api/patches/chat.1.patch +7 -9
- data/lib/slack/web/api/templates/endpoints.erb +0 -2
- data/lib/slack/web/faraday/connection.rb +5 -5
- data/lib/slack/web/faraday/request.rb +4 -1
- data/lib/slack/web/faraday/response/raise_error.rb +2 -14
- data/lib/slack/web/faraday/response/wrap_error.rb +11 -5
- data/lib/slack/web/pagination/cursor.rb +1 -5
- data/lib/slack-ruby-client.rb +3 -2
- data/lib/tasks/real_time.rake +1 -3
- data/lib/tasks/web.rake +4 -0
- data/slack-ruby-client.gemspec +5 -14
- data/spec/fixtures/slack/web/429_error.yml +50 -54
- data/spec/fixtures/slack/web/auth_test_error.yml +51 -18
- data/spec/fixtures/slack/web/auth_test_success.yml +50 -26
- data/spec/fixtures/slack/web/conversations_info.yml +167 -0
- data/spec/fixtures/slack/web/conversations_setTopic.yml +42 -27
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +89 -59
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +131 -86
- data/spec/fixtures/slack/web/paginated_users_list.yml +501 -69
- data/spec/fixtures/slack/web/rtm_connect.yml +267 -30
- data/spec/fixtures/slack/web/rtm_start.yml +771 -60
- data/spec/fixtures/slack/web/users_info.yml +153 -69
- data/spec/fixtures/slack/web/users_list.yml +102 -41
- data/spec/fixtures/slack/web/views_open_error.yml +49 -42
- data/spec/integration/integration_spec.rb +1 -1
- data/spec/slack/events/request_spec.rb +7 -6
- data/spec/slack/real_time/client_spec.rb +37 -39
- data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +10 -0
- data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +10 -0
- data/spec/slack/real_time/event_handlers/bot_spec.rb +1 -1
- data/spec/slack/real_time/event_handlers/channel_spec.rb +9 -9
- data/spec/slack/real_time/event_handlers/group_spec.rb +2 -2
- data/spec/slack/real_time/event_handlers/im_spec.rb +7 -7
- data/spec/slack/real_time/event_handlers/user_spec.rb +2 -2
- data/spec/slack/real_time/rtm_connect_spec.rb +1 -1
- data/spec/slack/real_time/rtm_start_spec.rb +1 -1
- data/spec/slack/real_time/store_spec.rb +2 -2
- data/spec/slack/slack_spec.rb +7 -5
- data/spec/slack/version_spec.rb +1 -1
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +5 -0
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +5 -0
- data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +35 -0
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +9 -9
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +1 -1
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +6 -6
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +22 -2
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +8 -8
- data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +36 -0
- data/spec/slack/web/api/endpoints/apps_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/bookmarks_spec.rb +40 -0
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +4 -4
- data/spec/slack/web/api/endpoints/calls_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +4 -6
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +28 -16
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +4 -2
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +22 -14
- data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -5
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +6 -3
- data/spec/slack/web/api/endpoints/{apps_permissions_scopes_spec.rb → openid_connect_spec.rb} +1 -1
- data/spec/slack/web/api/endpoints/reactions_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/reminders_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/{apps_permissions_resources_spec.rb → team_billing_spec.rb} +1 -1
- data/spec/slack/web/api/endpoints/team_preferences_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +2 -2
- data/spec/slack/web/api/error_spec.rb +5 -7
- data/spec/slack/web/api/errors/slack_error_spec.rb +21 -26
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +1 -1
- data/spec/slack/web/api/pagination/cursor_spec.rb +8 -10
- data/spec/slack/web/client_spec.rb +46 -32
- data/spec/slack/web/faraday/request_spec.rb +80 -0
- data/spec/slack/web/faraday/response/raise_error_spec.rb +2 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/real_time/connected_client.rb +2 -8
- data/spec/support/vcr.rb +33 -2
- metadata +50 -297
- data/.travis.yml +0 -28
- data/lib/slack/web/api/errors/internal_error.rb +0 -14
- data/lib/slack/web/api/mixins/channels.id.json +0 -20
- data/lib/slack/web/api/mixins/channels.id.rb +0 -25
- data/lib/slack/web/api/mixins/groups.id.json +0 -20
- data/lib/slack/web/api/mixins/groups.id.rb +0 -25
- data/spec/fixtures/slack/web/503_error.yml +0 -14
- data/spec/fixtures/slack/web/channels_info.yml +0 -139
- data/spec/fixtures/slack/web/groups_info.yml +0 -43
- data/spec/slack/web/api/endpoints/admin_conversations_whitelist_spec.rb +0 -32
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +0 -19
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -109
- data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/im_spec.rb +0 -39
- data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -39
- data/spec/slack/web/api/endpoints/views_spec.rb +0 -29
- data/spec/slack/web/api/mixins/channels_spec.rb +0 -43
- data/spec/slack/web/api/mixins/groups_spec.rb +0 -43
|
@@ -6,12 +6,36 @@ module Slack
|
|
|
6
6
|
module Api
|
|
7
7
|
module Endpoints
|
|
8
8
|
module AdminUsersSession
|
|
9
|
+
#
|
|
10
|
+
# Clear user-specific session settings—the session duration and what happens when the client closes—for a list of users.
|
|
11
|
+
#
|
|
12
|
+
# @option options [array] :user_ids
|
|
13
|
+
# The IDs of users you'd like to clear session settings for.
|
|
14
|
+
# @see https://api.slack.com/methods/admin.users.session.clearSettings
|
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.clearSettings.json
|
|
16
|
+
def admin_users_session_clearSettings(options = {})
|
|
17
|
+
throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
|
|
18
|
+
post('admin.users.session.clearSettings', options)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
#
|
|
22
|
+
# Get user-specific session settings—the session duration and what happens when the client closes—given a list of users.
|
|
23
|
+
#
|
|
24
|
+
# @option options [array] :user_ids
|
|
25
|
+
# The IDs of users you'd like to fetch session settings for. Note: if a user does not have any active sessions, they will not be returned in the response.
|
|
26
|
+
# @see https://api.slack.com/methods/admin.users.session.getSettings
|
|
27
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.getSettings.json
|
|
28
|
+
def admin_users_session_getSettings(options = {})
|
|
29
|
+
throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
|
|
30
|
+
post('admin.users.session.getSettings', options)
|
|
31
|
+
end
|
|
32
|
+
|
|
9
33
|
#
|
|
10
34
|
# Revoke a single session for a user. The user will be forced to login to Slack.
|
|
11
35
|
#
|
|
12
|
-
# @option options [
|
|
36
|
+
# @option options [integer] :session_id
|
|
13
37
|
# ID of the session to invalidate.
|
|
14
|
-
# @option options [
|
|
38
|
+
# @option options [string] :team_id
|
|
15
39
|
# ID of the workspace that the session belongs to.
|
|
16
40
|
# @see https://api.slack.com/methods/admin.users.session.invalidate
|
|
17
41
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.invalidate.json
|
|
@@ -24,13 +48,13 @@ module Slack
|
|
|
24
48
|
#
|
|
25
49
|
# List active user sessions for an organization
|
|
26
50
|
#
|
|
27
|
-
# @option options [
|
|
51
|
+
# @option options [string] :cursor
|
|
28
52
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
|
29
|
-
# @option options [
|
|
53
|
+
# @option options [integer] :limit
|
|
30
54
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
|
31
|
-
# @option options [
|
|
55
|
+
# @option options [string] :team_id
|
|
32
56
|
# The ID of the workspace you'd like active sessions for. If you pass a team_id, you'll need to pass a user_id as well.
|
|
33
|
-
# @option options [
|
|
57
|
+
# @option options [string] :user_id
|
|
34
58
|
# The ID of user you'd like active sessions for. If you pass a user_id, you'll need to pass a team_id as well.
|
|
35
59
|
# @see https://api.slack.com/methods/admin.users.session.list
|
|
36
60
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.list.json
|
|
@@ -47,11 +71,11 @@ module Slack
|
|
|
47
71
|
#
|
|
48
72
|
# Wipes all valid sessions on all devices for a given user
|
|
49
73
|
#
|
|
50
|
-
# @option options [
|
|
74
|
+
# @option options [string] :user_id
|
|
51
75
|
# The ID of the user to wipe sessions for.
|
|
52
|
-
# @option options [
|
|
76
|
+
# @option options [boolean] :mobile_only
|
|
53
77
|
# Only expire mobile sessions (default: false).
|
|
54
|
-
# @option options [
|
|
78
|
+
# @option options [boolean] :web_only
|
|
55
79
|
# Only expire web sessions (default: false).
|
|
56
80
|
# @see https://api.slack.com/methods/admin.users.session.reset
|
|
57
81
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.reset.json
|
|
@@ -59,6 +83,38 @@ module Slack
|
|
|
59
83
|
throw ArgumentError.new('Required arguments :user_id missing') if options[:user_id].nil?
|
|
60
84
|
post('admin.users.session.reset', options)
|
|
61
85
|
end
|
|
86
|
+
|
|
87
|
+
#
|
|
88
|
+
# Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users
|
|
89
|
+
#
|
|
90
|
+
# @option options [array] :user_ids
|
|
91
|
+
# The ID of the user to wipe sessions for.
|
|
92
|
+
# @option options [boolean] :mobile_only
|
|
93
|
+
# Only expire mobile sessions (default: false).
|
|
94
|
+
# @option options [boolean] :web_only
|
|
95
|
+
# Only expire web sessions (default: false).
|
|
96
|
+
# @see https://api.slack.com/methods/admin.users.session.resetBulk
|
|
97
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.resetBulk.json
|
|
98
|
+
def admin_users_session_resetBulk(options = {})
|
|
99
|
+
throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
|
|
100
|
+
post('admin.users.session.resetBulk', options)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
#
|
|
104
|
+
# Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users.
|
|
105
|
+
#
|
|
106
|
+
# @option options [array] :user_ids
|
|
107
|
+
# The list of user IDs to apply the session settings for.
|
|
108
|
+
# @option options [boolean] :desktop_app_browser_quit
|
|
109
|
+
# Terminate the session when the client—either the desktop app or a browser window—is closed.
|
|
110
|
+
# @option options [integer] :duration
|
|
111
|
+
# The session duration, in seconds. The minimum value is 28800, which represents 8 hours; the max value is 315569520 or 10 years (that's a long Slack session).
|
|
112
|
+
# @see https://api.slack.com/methods/admin.users.session.setSettings
|
|
113
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.setSettings.json
|
|
114
|
+
def admin_users_session_setSettings(options = {})
|
|
115
|
+
throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
|
|
116
|
+
post('admin.users.session.setSettings', options)
|
|
117
|
+
end
|
|
62
118
|
end
|
|
63
119
|
end
|
|
64
120
|
end
|
|
@@ -0,0 +1,25 @@
|
|
|
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 AdminUsersUnsupportedversions
|
|
9
|
+
#
|
|
10
|
+
# Ask Slackbot to send you an export listing all workspace members using unsupported software, presented as a zipped CSV file.
|
|
11
|
+
#
|
|
12
|
+
# @option options [integer] :date_end_of_support
|
|
13
|
+
# Unix timestamp of the date of past or upcoming end of support cycles. If not provided will include all announced end of support cycles.
|
|
14
|
+
# @option options [integer] :date_sessions_started
|
|
15
|
+
# Unix timestamp of a date to start looking for user sessions. If not provided will start six months ago.
|
|
16
|
+
# @see https://api.slack.com/methods/admin.users.unsupportedVersions.export
|
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.unsupportedVersions/admin.users.unsupportedVersions.export.json
|
|
18
|
+
def admin_users_unsupportedVersions_export(options = {})
|
|
19
|
+
post('admin.users.unsupportedVersions.export', options)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -9,7 +9,7 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# Checks API calling code.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [string] :error
|
|
13
13
|
# Error response to return.
|
|
14
14
|
# @see https://api.slack.com/methods/api.test
|
|
15
15
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/api/api.test.json
|
|
@@ -9,9 +9,9 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# Uninstalls your app from a workspace.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [string] :client_id
|
|
13
13
|
# Issued when you created your application.
|
|
14
|
-
# @option options [
|
|
14
|
+
# @option options [string] :client_secret
|
|
15
15
|
# Issued when you created your application.
|
|
16
16
|
# @see https://api.slack.com/methods/apps.uninstall
|
|
17
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps/apps.uninstall.json
|
|
@@ -9,11 +9,11 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [string] :event_context
|
|
13
13
|
# .
|
|
14
|
-
# @option options [
|
|
14
|
+
# @option options [string] :cursor
|
|
15
15
|
# .
|
|
16
|
-
# @option options [
|
|
16
|
+
# @option options [integer] :limit
|
|
17
17
|
# .
|
|
18
18
|
# @see https://api.slack.com/methods/apps.event.authorizations.list
|
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.event.authorizations/apps.event.authorizations.list.json
|
|
@@ -0,0 +1,77 @@
|
|
|
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 AppsManifest
|
|
9
|
+
#
|
|
10
|
+
# Create an app from an app manifest.
|
|
11
|
+
#
|
|
12
|
+
# @option options [manifest object as string] :manifest
|
|
13
|
+
# A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one.
|
|
14
|
+
# @see https://api.slack.com/methods/apps.manifest.create
|
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.create.json
|
|
16
|
+
def apps_manifest_create(options = {})
|
|
17
|
+
throw ArgumentError.new('Required arguments :manifest missing') if options[:manifest].nil?
|
|
18
|
+
post('apps.manifest.create', options)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
#
|
|
22
|
+
# Permanently deletes an app created through app manifests
|
|
23
|
+
#
|
|
24
|
+
# @option options [Object] :app_id
|
|
25
|
+
# The ID of the app you want to delete.
|
|
26
|
+
# @see https://api.slack.com/methods/apps.manifest.delete
|
|
27
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.delete.json
|
|
28
|
+
def apps_manifest_delete(options = {})
|
|
29
|
+
throw ArgumentError.new('Required arguments :app_id missing') if options[:app_id].nil?
|
|
30
|
+
post('apps.manifest.delete', options)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
#
|
|
34
|
+
# Export an app manifest from an existing app
|
|
35
|
+
#
|
|
36
|
+
# @option options [Object] :app_id
|
|
37
|
+
# The ID of the app whose configuration you want to export as a manifest.
|
|
38
|
+
# @see https://api.slack.com/methods/apps.manifest.export
|
|
39
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.export.json
|
|
40
|
+
def apps_manifest_export(options = {})
|
|
41
|
+
throw ArgumentError.new('Required arguments :app_id missing') if options[:app_id].nil?
|
|
42
|
+
post('apps.manifest.export', options)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
#
|
|
46
|
+
# Update an app from an app manifest
|
|
47
|
+
#
|
|
48
|
+
# @option options [Object] :app_id
|
|
49
|
+
# The ID of the app whose configuration you want to update.
|
|
50
|
+
# @option options [manifest object as string] :manifest
|
|
51
|
+
# A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely replaces any previous configuration, manifest must contain both unmodified and modified fields.
|
|
52
|
+
# @see https://api.slack.com/methods/apps.manifest.update
|
|
53
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.update.json
|
|
54
|
+
def apps_manifest_update(options = {})
|
|
55
|
+
throw ArgumentError.new('Required arguments :app_id missing') if options[:app_id].nil?
|
|
56
|
+
throw ArgumentError.new('Required arguments :manifest missing') if options[:manifest].nil?
|
|
57
|
+
post('apps.manifest.update', options)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
#
|
|
61
|
+
# Validate an app manifest
|
|
62
|
+
#
|
|
63
|
+
# @option options [manifest object as string] :manifest
|
|
64
|
+
# The manifest to be validated. Will be validated against the app manifest schema - read our guide.
|
|
65
|
+
# @option options [Object] :app_id
|
|
66
|
+
# The ID of the app whose configuration you want to validate.
|
|
67
|
+
# @see https://api.slack.com/methods/apps.manifest.validate
|
|
68
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.validate.json
|
|
69
|
+
def apps_manifest_validate(options = {})
|
|
70
|
+
throw ArgumentError.new('Required arguments :manifest missing') if options[:manifest].nil?
|
|
71
|
+
post('apps.manifest.validate', options)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -9,7 +9,7 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# Revokes a token.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [boolean] :test
|
|
13
13
|
# Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked.
|
|
14
14
|
# @see https://api.slack.com/methods/auth.revoke
|
|
15
15
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/auth/auth.revoke.json
|
|
@@ -9,11 +9,11 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# List the workspaces a token can access.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [string] :cursor
|
|
13
13
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
|
14
|
-
# @option options [
|
|
14
|
+
# @option options [boolean] :include_icon
|
|
15
15
|
# Whether to return icon paths for each workspace. An icon path represents a URI pointing to the image signifying the workspace.
|
|
16
|
-
# @option options [
|
|
16
|
+
# @option options [integer] :limit
|
|
17
17
|
# The maximum number of workspaces to return. Must be a positive integer no larger than 1000.
|
|
18
18
|
# @see https://api.slack.com/methods/auth.teams.list
|
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/auth.teams/auth.teams.list.json
|
|
@@ -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 Bookmarks
|
|
9
|
+
#
|
|
10
|
+
# Add bookmark to a channel.
|
|
11
|
+
#
|
|
12
|
+
# @option options [string] :channel_id
|
|
13
|
+
# Channel to add bookmark in.
|
|
14
|
+
# @option options [string] :title
|
|
15
|
+
# Title for the bookmark.
|
|
16
|
+
# @option options [string] :type
|
|
17
|
+
# Type of the bookmark i.e link.
|
|
18
|
+
# @option options [string] :emoji
|
|
19
|
+
# Emoji tag to apply to the link.
|
|
20
|
+
# @option options [string] :entity_id
|
|
21
|
+
# ID of the entity being bookmarked. Only applies to message and file types.
|
|
22
|
+
# @option options [string] :link
|
|
23
|
+
# Link to bookmark.
|
|
24
|
+
# @option options [string] :parent_id
|
|
25
|
+
# Id of this bookmark's parent.
|
|
26
|
+
# @see https://api.slack.com/methods/bookmarks.add
|
|
27
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.add.json
|
|
28
|
+
def bookmarks_add(options = {})
|
|
29
|
+
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
|
|
30
|
+
throw ArgumentError.new('Required arguments :title missing') if options[:title].nil?
|
|
31
|
+
throw ArgumentError.new('Required arguments :type missing') if options[:type].nil?
|
|
32
|
+
post('bookmarks.add', options)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
#
|
|
36
|
+
# Edit bookmark.
|
|
37
|
+
#
|
|
38
|
+
# @option options [string] :bookmark_id
|
|
39
|
+
# Bookmark to update.
|
|
40
|
+
# @option options [string] :channel_id
|
|
41
|
+
# Channel to update bookmark in.
|
|
42
|
+
# @option options [string] :emoji
|
|
43
|
+
# Emoji tag to apply to the link.
|
|
44
|
+
# @option options [string] :link
|
|
45
|
+
# Link to bookmark.
|
|
46
|
+
# @option options [string] :title
|
|
47
|
+
# Title for the bookmark.
|
|
48
|
+
# @see https://api.slack.com/methods/bookmarks.edit
|
|
49
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.edit.json
|
|
50
|
+
def bookmarks_edit(options = {})
|
|
51
|
+
throw ArgumentError.new('Required arguments :bookmark_id missing') if options[:bookmark_id].nil?
|
|
52
|
+
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
|
|
53
|
+
post('bookmarks.edit', options)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
#
|
|
57
|
+
# List bookmark for the channel.
|
|
58
|
+
#
|
|
59
|
+
# @option options [string] :channel_id
|
|
60
|
+
# Channel to list bookmarks in.
|
|
61
|
+
# @see https://api.slack.com/methods/bookmarks.list
|
|
62
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.list.json
|
|
63
|
+
def bookmarks_list(options = {})
|
|
64
|
+
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
|
|
65
|
+
post('bookmarks.list', options)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
#
|
|
69
|
+
# Remove bookmark from the channel.
|
|
70
|
+
#
|
|
71
|
+
# @option options [string] :bookmark_id
|
|
72
|
+
# Bookmark to remove.
|
|
73
|
+
# @option options [string] :channel_id
|
|
74
|
+
# Channel to remove bookmark.
|
|
75
|
+
# @see https://api.slack.com/methods/bookmarks.remove
|
|
76
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.remove.json
|
|
77
|
+
def bookmarks_remove(options = {})
|
|
78
|
+
throw ArgumentError.new('Required arguments :bookmark_id missing') if options[:bookmark_id].nil?
|
|
79
|
+
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
|
|
80
|
+
post('bookmarks.remove', options)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -9,9 +9,9 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# Gets information about a bot user.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [user] :bot
|
|
13
13
|
# Bot user to get info on.
|
|
14
|
-
# @option options [
|
|
14
|
+
# @option options [team] :team_id
|
|
15
15
|
# encoded team id or enterprise id where the bot exists, required if org token is used.
|
|
16
16
|
# @see https://api.slack.com/methods/bots.info
|
|
17
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bots/bots.info.json
|
|
@@ -9,21 +9,21 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# Registers a new Call.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [string] :external_unique_id
|
|
13
13
|
# An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.
|
|
14
|
-
# @option options [
|
|
14
|
+
# @option options [string] :join_url
|
|
15
15
|
# The URL required for a client to join the Call.
|
|
16
|
-
# @option options [
|
|
16
|
+
# @option options [string] :created_by
|
|
17
17
|
# The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.
|
|
18
|
-
# @option options [
|
|
18
|
+
# @option options [integer] :date_start
|
|
19
19
|
# Call start time in UTC UNIX timestamp format.
|
|
20
|
-
# @option options [
|
|
20
|
+
# @option options [string] :desktop_app_join_url
|
|
21
21
|
# When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
|
|
22
|
-
# @option options [
|
|
22
|
+
# @option options [string] :external_display_id
|
|
23
23
|
# An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.
|
|
24
|
-
# @option options [
|
|
24
|
+
# @option options [string] :title
|
|
25
25
|
# The name of the Call.
|
|
26
|
-
# @option options [
|
|
26
|
+
# @option options [array] :users
|
|
27
27
|
# The list of users to register as participants in the Call. Read more on how to specify users here.
|
|
28
28
|
# @see https://api.slack.com/methods/calls.add
|
|
29
29
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/calls/calls.add.json
|
|
@@ -36,9 +36,9 @@ module Slack
|
|
|
36
36
|
#
|
|
37
37
|
# Ends a Call.
|
|
38
38
|
#
|
|
39
|
-
# @option options [
|
|
39
|
+
# @option options [string] :id
|
|
40
40
|
# id returned when registering the call using the calls.add method.
|
|
41
|
-
# @option options [
|
|
41
|
+
# @option options [integer] :duration
|
|
42
42
|
# Call duration in seconds.
|
|
43
43
|
# @see https://api.slack.com/methods/calls.end
|
|
44
44
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/calls/calls.end.json
|
|
@@ -50,7 +50,7 @@ module Slack
|
|
|
50
50
|
#
|
|
51
51
|
# Returns information about a Call.
|
|
52
52
|
#
|
|
53
|
-
# @option options [
|
|
53
|
+
# @option options [string] :id
|
|
54
54
|
# id of the Call returned by the calls.add method.
|
|
55
55
|
# @see https://api.slack.com/methods/calls.info
|
|
56
56
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/calls/calls.info.json
|
|
@@ -62,13 +62,13 @@ module Slack
|
|
|
62
62
|
#
|
|
63
63
|
# Updates information about a Call.
|
|
64
64
|
#
|
|
65
|
-
# @option options [
|
|
65
|
+
# @option options [string] :id
|
|
66
66
|
# id returned by the calls.add method.
|
|
67
|
-
# @option options [
|
|
67
|
+
# @option options [string] :desktop_app_join_url
|
|
68
68
|
# When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
|
|
69
|
-
# @option options [
|
|
69
|
+
# @option options [string] :join_url
|
|
70
70
|
# The URL required for a client to join the Call.
|
|
71
|
-
# @option options [
|
|
71
|
+
# @option options [string] :title
|
|
72
72
|
# The name of the Call.
|
|
73
73
|
# @see https://api.slack.com/methods/calls.update
|
|
74
74
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/calls/calls.update.json
|
|
@@ -9,9 +9,9 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# Registers new participants added to a Call.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [string] :id
|
|
13
13
|
# id returned by the calls.add method.
|
|
14
|
-
# @option options [
|
|
14
|
+
# @option options [array] :users
|
|
15
15
|
# The list of users to add as participants in the Call. Read more on how to specify users here.
|
|
16
16
|
# @see https://api.slack.com/methods/calls.participants.add
|
|
17
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/calls.participants/calls.participants.add.json
|
|
@@ -24,9 +24,9 @@ module Slack
|
|
|
24
24
|
#
|
|
25
25
|
# Registers participants removed from a Call.
|
|
26
26
|
#
|
|
27
|
-
# @option options [
|
|
27
|
+
# @option options [string] :id
|
|
28
28
|
# id returned by the calls.add method.
|
|
29
|
-
# @option options [
|
|
29
|
+
# @option options [array] :users
|
|
30
30
|
# The list of users to remove as participants in the Call. Read more on how to specify users here.
|
|
31
31
|
# @see https://api.slack.com/methods/calls.participants.remove
|
|
32
32
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/calls.participants/calls.participants.remove.json
|