slack-ruby-client 0.14.4 → 0.14.5
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/.rubocop.yml +19 -11
- data/.rubocop_todo.yml +66 -47
- data/CHANGELOG.md +8 -0
- data/Dangerfile +1 -0
- data/Gemfile +1 -0
- data/README.md +16 -9
- data/Rakefile +1 -0
- data/bin/commands.rb +6 -0
- data/bin/commands/admin_apps.rb +27 -0
- data/bin/commands/admin_apps_requests.rb +16 -0
- data/bin/commands/admin_users_session.rb +3 -2
- data/bin/commands/api.rb +3 -2
- data/bin/commands/apps.rb +3 -2
- data/bin/commands/apps_permissions.rb +5 -4
- data/bin/commands/apps_permissions_resources.rb +3 -2
- data/bin/commands/apps_permissions_scopes.rb +3 -2
- data/bin/commands/apps_permissions_users.rb +5 -4
- data/bin/commands/auth.rb +5 -4
- data/bin/commands/bots.rb +3 -2
- data/bin/commands/channels.rb +31 -30
- data/bin/commands/chat.rb +19 -18
- data/bin/commands/chat_scheduledMessages.rb +3 -2
- data/bin/commands/conversations.rb +35 -34
- data/bin/commands/dialog.rb +3 -2
- data/bin/commands/dnd.rb +9 -8
- data/bin/commands/emoji.rb +3 -2
- data/bin/commands/files.rb +13 -12
- data/bin/commands/files_comments.rb +3 -2
- data/bin/commands/files_remote.rb +78 -0
- data/bin/commands/groups.rb +33 -32
- data/bin/commands/im.rb +13 -12
- data/bin/commands/migration.rb +3 -2
- data/bin/commands/mpim.rb +11 -10
- data/bin/commands/oauth.rb +5 -4
- data/bin/commands/oauth_v2.rb +17 -0
- data/bin/commands/pins.rb +7 -8
- data/bin/commands/reactions.rb +10 -11
- data/bin/commands/reminders.rb +11 -10
- data/bin/commands/rtm.rb +5 -4
- data/bin/commands/search.rb +7 -6
- data/bin/commands/stars.rb +7 -6
- data/bin/commands/team.rb +9 -8
- data/bin/commands/team_profile.rb +3 -2
- data/bin/commands/usergroups.rb +11 -10
- data/bin/commands/usergroups_users.rb +5 -4
- data/bin/commands/users.rb +21 -20
- data/bin/commands/users_admin.rb +1 -0
- data/bin/commands/users_prefs.rb +1 -0
- data/bin/commands/users_profile.rb +5 -4
- data/bin/commands/views.rb +48 -0
- data/bin/slack +1 -2
- data/examples/hi_real_time/Gemfile +1 -0
- data/examples/hi_real_time/hi.rb +7 -3
- data/examples/hi_real_time_and_web/Gemfile +1 -0
- data/examples/hi_real_time_and_web/hi.rb +7 -3
- data/examples/hi_real_time_async_async/Gemfile +1 -0
- data/examples/hi_real_time_async_async/hi.rb +6 -2
- data/examples/hi_real_time_async_celluloid/Gemfile +1 -0
- data/examples/hi_real_time_async_celluloid/hi.rb +7 -3
- data/examples/hi_real_time_async_eventmachine/Gemfile +1 -0
- data/examples/hi_real_time_async_eventmachine/hi.rb +7 -3
- data/examples/hi_web/Gemfile +1 -0
- data/examples/hi_web/hi.rb +1 -0
- data/examples/new_ticket/Gemfile +1 -0
- data/examples/new_ticket/new_ticket.rb +1 -0
- data/lib/slack-ruby-client.rb +3 -2
- data/lib/slack.rb +1 -0
- data/lib/slack/config.rb +1 -0
- data/lib/slack/events/config.rb +1 -0
- data/lib/slack/events/request.rb +3 -1
- data/lib/slack/logger.rb +6 -5
- data/lib/slack/messages/formatting.rb +1 -0
- data/lib/slack/messages/message.rb +1 -0
- data/lib/slack/real_time/api/message.rb +3 -1
- data/lib/slack/real_time/api/message_id.rb +1 -0
- data/lib/slack/real_time/api/ping.rb +5 -2
- data/lib/slack/real_time/api/typing.rb +3 -1
- data/lib/slack/real_time/client.rb +19 -12
- data/lib/slack/real_time/concurrency.rb +1 -0
- data/lib/slack/real_time/concurrency/async.rb +15 -7
- data/lib/slack/real_time/concurrency/celluloid.rb +9 -3
- data/lib/slack/real_time/concurrency/eventmachine.rb +7 -4
- data/lib/slack/real_time/config.rb +6 -1
- data/lib/slack/real_time/models.rb +1 -0
- data/lib/slack/real_time/models/base.rb +1 -0
- data/lib/slack/real_time/models/bot.rb +1 -0
- data/lib/slack/real_time/models/channel.rb +1 -0
- data/lib/slack/real_time/models/group.rb +1 -0
- data/lib/slack/real_time/models/im.rb +1 -0
- data/lib/slack/real_time/models/team.rb +1 -0
- data/lib/slack/real_time/models/user.rb +1 -0
- data/lib/slack/real_time/socket.rb +14 -11
- data/lib/slack/real_time/stores.rb +1 -0
- data/lib/slack/real_time/stores/base.rb +1 -0
- data/lib/slack/real_time/stores/starter.rb +1 -0
- data/lib/slack/real_time/stores/store.rb +16 -25
- data/lib/slack/version.rb +2 -1
- data/lib/slack/web/api/endpoints.rb +11 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +42 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +2 -1
- data/lib/slack/web/api/endpoints/api.rb +2 -1
- data/lib/slack/web/api/endpoints/apps.rb +2 -1
- data/lib/slack/web/api/endpoints/apps_permissions.rb +3 -2
- data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +2 -1
- data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +2 -1
- data/lib/slack/web/api/endpoints/apps_permissions_users.rb +3 -2
- data/lib/slack/web/api/endpoints/auth.rb +3 -2
- data/lib/slack/web/api/endpoints/bots.rb +2 -1
- data/lib/slack/web/api/endpoints/channels.rb +16 -16
- data/lib/slack/web/api/endpoints/chat.rb +10 -9
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +2 -1
- data/lib/slack/web/api/endpoints/conversations.rb +18 -17
- data/lib/slack/web/api/endpoints/dialog.rb +2 -1
- data/lib/slack/web/api/endpoints/dnd.rb +5 -4
- data/lib/slack/web/api/endpoints/emoji.rb +2 -1
- data/lib/slack/web/api/endpoints/files.rb +7 -6
- data/lib/slack/web/api/endpoints/files_comments.rb +2 -1
- data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
- data/lib/slack/web/api/endpoints/groups.rb +17 -22
- data/lib/slack/web/api/endpoints/im.rb +7 -8
- data/lib/slack/web/api/endpoints/migration.rb +2 -1
- data/lib/slack/web/api/endpoints/mpim.rb +6 -7
- data/lib/slack/web/api/endpoints/oauth.rb +3 -2
- data/lib/slack/web/api/endpoints/oauth_v2.rb +30 -0
- data/lib/slack/web/api/endpoints/pins.rb +5 -9
- data/lib/slack/web/api/endpoints/reactions.rb +9 -12
- data/lib/slack/web/api/endpoints/reminders.rb +6 -5
- data/lib/slack/web/api/endpoints/rtm.rb +3 -2
- data/lib/slack/web/api/endpoints/search.rb +4 -3
- data/lib/slack/web/api/endpoints/stars.rb +4 -5
- data/lib/slack/web/api/endpoints/team.rb +5 -5
- data/lib/slack/web/api/endpoints/team_profile.rb +2 -1
- data/lib/slack/web/api/endpoints/usergroups.rb +6 -5
- data/lib/slack/web/api/endpoints/usergroups_users.rb +3 -2
- data/lib/slack/web/api/endpoints/users.rb +11 -16
- data/lib/slack/web/api/endpoints/users_admin.rb +1 -0
- data/lib/slack/web/api/endpoints/users_prefs.rb +1 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +3 -2
- data/lib/slack/web/api/endpoints/views.rb +97 -0
- data/lib/slack/web/api/error.rb +1 -0
- data/lib/slack/web/api/errors/slack_error.rb +2 -1
- data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -0
- data/lib/slack/web/api/mixins.rb +1 -0
- data/lib/slack/web/api/mixins/channels.id.rb +1 -0
- data/lib/slack/web/api/mixins/groups.id.rb +1 -0
- data/lib/slack/web/api/mixins/ids.id.rb +4 -1
- data/lib/slack/web/api/mixins/users.id.rb +1 -0
- data/lib/slack/web/api/mixins/users.search.rb +1 -0
- data/lib/slack/web/api/patches/views.1.view-json.patch +40 -0
- data/lib/slack/web/api/patches/views.1.views-published.patch +16 -0
- data/lib/slack/web/api/templates/command.erb +1 -0
- data/lib/slack/web/api/templates/commands.erb +1 -0
- data/lib/slack/web/api/templates/endpoints.erb +1 -0
- data/lib/slack/web/api/templates/method.erb +1 -0
- data/lib/slack/web/api/templates/method_spec.erb +1 -0
- data/lib/slack/web/client.rb +1 -0
- data/lib/slack/web/config.rb +1 -0
- data/lib/slack/web/faraday/connection.rb +1 -0
- data/lib/slack/web/faraday/request.rb +1 -0
- data/lib/slack/web/faraday/response/raise_error.rb +7 -6
- data/lib/slack/web/pagination/cursor.rb +1 -0
- data/lib/slack_ruby_client.rb +1 -0
- data/lib/tasks/git.rake +1 -0
- data/lib/tasks/real_time.rake +12 -4
- data/lib/tasks/update.rake +1 -0
- data/lib/tasks/web.rake +17 -6
- data/screenshots/create-app.png +0 -0
- data/slack-ruby-client.gemspec +4 -1
- data/spec/integration/integration_spec.rb +16 -17
- data/spec/slack/config_spec.rb +2 -0
- data/spec/slack/events/config_spec.rb +8 -4
- data/spec/slack/events/request_spec.rb +67 -37
- data/spec/slack/messages/formatting_spec.rb +25 -13
- data/spec/slack/real_time/api/message_spec.rb +6 -1
- data/spec/slack/real_time/api/ping_spec.rb +2 -0
- data/spec/slack/real_time/api/typing_spec.rb +5 -1
- data/spec/slack/real_time/client_spec.rb +137 -39
- data/spec/slack/real_time/concurrency/celluloid_spec.rb +11 -6
- data/spec/slack/real_time/concurrency/eventmachine_spec.rb +9 -1
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +2 -0
- data/spec/slack/real_time/event_handlers/bot_spec.rb +2 -1
- data/spec/slack/real_time/event_handlers/channel_spec.rb +9 -6
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +2 -1
- data/spec/slack/real_time/event_handlers/group_spec.rb +5 -4
- data/spec/slack/real_time/event_handlers/im_spec.rb +4 -3
- data/spec/slack/real_time/event_handlers/team_spec.rb +3 -1
- data/spec/slack/real_time/event_handlers/user_spec.rb +1 -0
- data/spec/slack/real_time/rtm_connect_spec.rb +1 -0
- data/spec/slack/real_time/rtm_start_spec.rb +1 -0
- data/spec/slack/real_time/store_spec.rb +2 -1
- data/spec/slack/slack_spec.rb +37 -5
- data/spec/slack/version_spec.rb +2 -1
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/api_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_permissions_resources_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_permissions_scopes_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/bots_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/conversations_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +5 -1
- data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +2 -0
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +80 -25
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +12 -4
- data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +2 -0
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +6 -1
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +95 -0
- data/spec/slack/web/api/endpoints/dnd_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/emoji_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +24 -0
- data/spec/slack/web/api/endpoints/files_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/im_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/migration_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/mpim_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/oauth_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/pins_spec.rb +5 -1
- data/spec/slack/web/api/endpoints/reactions_spec.rb +8 -1
- data/spec/slack/web/api/endpoints/reminders_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/rtm_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/search_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/stars_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/team_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/views_spec.rb +29 -0
- data/spec/slack/web/api/error_spec.rb +4 -2
- data/spec/slack/web/api/errors/service_unavailable_spec.rb +6 -3
- data/spec/slack/web/api/errors/slack_error_spec.rb +4 -2
- data/spec/slack/web/api/mixins/channels_spec.rb +17 -7
- data/spec/slack/web/api/mixins/groups_spec.rb +17 -7
- data/spec/slack/web/api/mixins/users_spec.rb +17 -8
- data/spec/slack/web/api/pagination/cursor_spec.rb +40 -10
- data/spec/slack/web/client_spec.rb +45 -18
- data/spec/slack/web/faraday/response/raise_error_spec.rb +16 -5
- data/spec/spec_helper.rb +2 -1
- data/spec/support/queue_with_timeout.rb +1 -0
- data/spec/support/real_time/concurrency/mock.rb +1 -0
- data/spec/support/real_time/connected_client.rb +9 -3
- data/spec/support/real_time/event.rb +1 -0
- data/spec/support/token.rb +1 -0
- data/spec/support/vcr.rb +1 -0
- metadata +59 -7
- data/screenshots/register-bot.png +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,7 @@ module Slack
|
|
|
24
25
|
end
|
|
25
26
|
|
|
26
27
|
#
|
|
27
|
-
#
|
|
28
|
+
# Deletes a message.
|
|
28
29
|
#
|
|
29
30
|
# @option options [channel] :channel
|
|
30
31
|
# Channel containing the message to be deleted.
|
|
@@ -42,7 +43,7 @@ module Slack
|
|
|
42
43
|
end
|
|
43
44
|
|
|
44
45
|
#
|
|
45
|
-
#
|
|
46
|
+
# Deletes a pending scheduled message from the queue.
|
|
46
47
|
#
|
|
47
48
|
# @option options [channel] :channel
|
|
48
49
|
# The channel the scheduled_message is posting to.
|
|
@@ -60,7 +61,7 @@ module Slack
|
|
|
60
61
|
end
|
|
61
62
|
|
|
62
63
|
#
|
|
63
|
-
#
|
|
64
|
+
# Retrieve a permalink URL for a specific extant message
|
|
64
65
|
#
|
|
65
66
|
# @option options [channel] :channel
|
|
66
67
|
# The ID of the conversation or channel containing the message.
|
|
@@ -76,7 +77,7 @@ module Slack
|
|
|
76
77
|
end
|
|
77
78
|
|
|
78
79
|
#
|
|
79
|
-
#
|
|
80
|
+
# Share a me message into a channel.
|
|
80
81
|
#
|
|
81
82
|
# @option options [channel] :channel
|
|
82
83
|
# Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.
|
|
@@ -91,7 +92,7 @@ module Slack
|
|
|
91
92
|
end
|
|
92
93
|
|
|
93
94
|
#
|
|
94
|
-
#
|
|
95
|
+
# Sends an ephemeral message to a user in a channel.
|
|
95
96
|
#
|
|
96
97
|
# @option options [Object] :attachments
|
|
97
98
|
# A JSON-based array of structured attachments, presented as a URL-encoded string.
|
|
@@ -140,7 +141,7 @@ module Slack
|
|
|
140
141
|
end
|
|
141
142
|
|
|
142
143
|
#
|
|
143
|
-
#
|
|
144
|
+
# Sends a message to a channel.
|
|
144
145
|
#
|
|
145
146
|
# @option options [channel] :channel
|
|
146
147
|
# Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.
|
|
@@ -193,7 +194,7 @@ module Slack
|
|
|
193
194
|
end
|
|
194
195
|
|
|
195
196
|
#
|
|
196
|
-
#
|
|
197
|
+
# Schedules a message to be sent to a channel.
|
|
197
198
|
#
|
|
198
199
|
# @option options [channel] :channel
|
|
199
200
|
# Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.
|
|
@@ -229,7 +230,7 @@ module Slack
|
|
|
229
230
|
end
|
|
230
231
|
|
|
231
232
|
#
|
|
232
|
-
#
|
|
233
|
+
# Provide custom unfurl behavior for user-posted URLs
|
|
233
234
|
#
|
|
234
235
|
# @option options [channel] :channel
|
|
235
236
|
# Channel ID of the message.
|
|
@@ -254,7 +255,7 @@ module Slack
|
|
|
254
255
|
end
|
|
255
256
|
|
|
256
257
|
#
|
|
257
|
-
#
|
|
258
|
+
# Updates a message.
|
|
258
259
|
#
|
|
259
260
|
# @option options [channel] :channel
|
|
260
261
|
# Channel containing the message to be updated.
|
|
@@ -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,7 +7,7 @@ module Slack
|
|
|
6
7
|
module Endpoints
|
|
7
8
|
module ChatScheduledmessages
|
|
8
9
|
#
|
|
9
|
-
#
|
|
10
|
+
# Returns a list of scheduled messages.
|
|
10
11
|
#
|
|
11
12
|
# @option options [channel] :channel
|
|
12
13
|
# The channel of the scheduled messages.
|
|
@@ -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,7 +7,7 @@ module Slack
|
|
|
6
7
|
module Endpoints
|
|
7
8
|
module Conversations
|
|
8
9
|
#
|
|
9
|
-
#
|
|
10
|
+
# Archives a conversation.
|
|
10
11
|
#
|
|
11
12
|
# @option options [channel] :channel
|
|
12
13
|
# ID of conversation to archive.
|
|
@@ -19,7 +20,7 @@ module Slack
|
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
#
|
|
22
|
-
#
|
|
23
|
+
# Closes a direct message or multi-person direct message.
|
|
23
24
|
#
|
|
24
25
|
# @option options [channel] :channel
|
|
25
26
|
# Conversation to close.
|
|
@@ -32,7 +33,7 @@ module Slack
|
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
#
|
|
35
|
-
#
|
|
36
|
+
# Initiates a public or private channel-based conversation
|
|
36
37
|
#
|
|
37
38
|
# @option options [Object] :name
|
|
38
39
|
# Name of the public or private channel to create.
|
|
@@ -48,7 +49,7 @@ module Slack
|
|
|
48
49
|
end
|
|
49
50
|
|
|
50
51
|
#
|
|
51
|
-
#
|
|
52
|
+
# Fetches a conversation's history of messages and events.
|
|
52
53
|
#
|
|
53
54
|
# @option options [channel] :channel
|
|
54
55
|
# Conversation ID to fetch history for.
|
|
@@ -77,7 +78,7 @@ module Slack
|
|
|
77
78
|
end
|
|
78
79
|
|
|
79
80
|
#
|
|
80
|
-
#
|
|
81
|
+
# Retrieve information about a conversation.
|
|
81
82
|
#
|
|
82
83
|
# @option options [channel] :channel
|
|
83
84
|
# Conversation ID to learn more about.
|
|
@@ -94,7 +95,7 @@ module Slack
|
|
|
94
95
|
end
|
|
95
96
|
|
|
96
97
|
#
|
|
97
|
-
#
|
|
98
|
+
# Invites users to a channel.
|
|
98
99
|
#
|
|
99
100
|
# @option options [channel] :channel
|
|
100
101
|
# The ID of the public or private channel to invite user(s) to.
|
|
@@ -110,7 +111,7 @@ module Slack
|
|
|
110
111
|
end
|
|
111
112
|
|
|
112
113
|
#
|
|
113
|
-
#
|
|
114
|
+
# Joins an existing conversation.
|
|
114
115
|
#
|
|
115
116
|
# @option options [channel] :channel
|
|
116
117
|
# ID of conversation to join.
|
|
@@ -123,7 +124,7 @@ module Slack
|
|
|
123
124
|
end
|
|
124
125
|
|
|
125
126
|
#
|
|
126
|
-
#
|
|
127
|
+
# Removes a user from a conversation.
|
|
127
128
|
#
|
|
128
129
|
# @option options [channel] :channel
|
|
129
130
|
# ID of conversation to remove user from.
|
|
@@ -140,7 +141,7 @@ module Slack
|
|
|
140
141
|
end
|
|
141
142
|
|
|
142
143
|
#
|
|
143
|
-
#
|
|
144
|
+
# Leaves a conversation.
|
|
144
145
|
#
|
|
145
146
|
# @option options [channel] :channel
|
|
146
147
|
# Conversation to leave.
|
|
@@ -153,7 +154,7 @@ module Slack
|
|
|
153
154
|
end
|
|
154
155
|
|
|
155
156
|
#
|
|
156
|
-
#
|
|
157
|
+
# Lists all channels in a Slack team.
|
|
157
158
|
#
|
|
158
159
|
# @option options [Object] :cursor
|
|
159
160
|
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
|
@@ -176,7 +177,7 @@ module Slack
|
|
|
176
177
|
end
|
|
177
178
|
|
|
178
179
|
#
|
|
179
|
-
#
|
|
180
|
+
# Retrieve members of a conversation.
|
|
180
181
|
#
|
|
181
182
|
# @option options [channel] :channel
|
|
182
183
|
# ID of the conversation to retrieve members for.
|
|
@@ -199,7 +200,7 @@ module Slack
|
|
|
199
200
|
end
|
|
200
201
|
|
|
201
202
|
#
|
|
202
|
-
#
|
|
203
|
+
# Opens or resumes a direct message or multi-person direct message.
|
|
203
204
|
#
|
|
204
205
|
# @option options [channel] :channel
|
|
205
206
|
# Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead.
|
|
@@ -215,7 +216,7 @@ module Slack
|
|
|
215
216
|
end
|
|
216
217
|
|
|
217
218
|
#
|
|
218
|
-
#
|
|
219
|
+
# Renames a conversation.
|
|
219
220
|
#
|
|
220
221
|
# @option options [channel] :channel
|
|
221
222
|
# ID of conversation to rename.
|
|
@@ -231,7 +232,7 @@ module Slack
|
|
|
231
232
|
end
|
|
232
233
|
|
|
233
234
|
#
|
|
234
|
-
#
|
|
235
|
+
# Retrieve a thread of messages posted to a conversation
|
|
235
236
|
#
|
|
236
237
|
# @option options [channel] :channel
|
|
237
238
|
# Conversation ID to fetch thread from.
|
|
@@ -263,7 +264,7 @@ module Slack
|
|
|
263
264
|
end
|
|
264
265
|
|
|
265
266
|
#
|
|
266
|
-
#
|
|
267
|
+
# Sets the purpose for a conversation.
|
|
267
268
|
#
|
|
268
269
|
# @option options [channel] :channel
|
|
269
270
|
# Conversation to set the purpose of.
|
|
@@ -279,7 +280,7 @@ module Slack
|
|
|
279
280
|
end
|
|
280
281
|
|
|
281
282
|
#
|
|
282
|
-
#
|
|
283
|
+
# Sets the topic for a conversation.
|
|
283
284
|
#
|
|
284
285
|
# @option options [channel] :channel
|
|
285
286
|
# Conversation to set the topic of.
|
|
@@ -295,7 +296,7 @@ module Slack
|
|
|
295
296
|
end
|
|
296
297
|
|
|
297
298
|
#
|
|
298
|
-
#
|
|
299
|
+
# Reverses conversation archival.
|
|
299
300
|
#
|
|
300
301
|
# @option options [channel] :channel
|
|
301
302
|
# ID of conversation to unarchive.
|
|
@@ -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,7 +7,7 @@ module Slack
|
|
|
6
7
|
module Endpoints
|
|
7
8
|
module Dialog
|
|
8
9
|
#
|
|
9
|
-
# Open a dialog with a user
|
|
10
|
+
# Open a dialog with a user
|
|
10
11
|
#
|
|
11
12
|
# @option options [Object] :dialog
|
|
12
13
|
# The dialog definition. This must be a JSON-encoded string.
|
|
@@ -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,7 +7,7 @@ module Slack
|
|
|
6
7
|
module Endpoints
|
|
7
8
|
module Dnd
|
|
8
9
|
#
|
|
9
|
-
# Ends the user's
|
|
10
|
+
# Ends the current user's Do Not Disturb session immediately.
|
|
10
11
|
#
|
|
11
12
|
# @see https://api.slack.com/methods/dnd.endDnd
|
|
12
13
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.endDnd.json
|
|
@@ -24,7 +25,7 @@ module Slack
|
|
|
24
25
|
end
|
|
25
26
|
|
|
26
27
|
#
|
|
27
|
-
#
|
|
28
|
+
# Retrieves a user's current Do Not Disturb status.
|
|
28
29
|
#
|
|
29
30
|
# @option options [user] :user
|
|
30
31
|
# User to fetch status for (defaults to current user).
|
|
@@ -36,7 +37,7 @@ module Slack
|
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
#
|
|
39
|
-
#
|
|
40
|
+
# Turns on Do Not Disturb mode for the current user, or changes its duration.
|
|
40
41
|
#
|
|
41
42
|
# @option options [Object] :num_minutes
|
|
42
43
|
# Number of minutes, from now, to snooze until.
|
|
@@ -48,7 +49,7 @@ module Slack
|
|
|
48
49
|
end
|
|
49
50
|
|
|
50
51
|
#
|
|
51
|
-
#
|
|
52
|
+
# Retrieves the Do Not Disturb status for up to 50 users on a team.
|
|
52
53
|
#
|
|
53
54
|
# @option options [Object] :users
|
|
54
55
|
# Comma-separated list of users to fetch Do Not Disturb status for.
|
|
@@ -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,7 +7,7 @@ module Slack
|
|
|
6
7
|
module Endpoints
|
|
7
8
|
module Emoji
|
|
8
9
|
#
|
|
9
|
-
#
|
|
10
|
+
# Lists custom emoji for a team.
|
|
10
11
|
#
|
|
11
12
|
# @see https://api.slack.com/methods/emoji.list
|
|
12
13
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/emoji/emoji.list.json
|
|
@@ -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,7 +7,7 @@ module Slack
|
|
|
6
7
|
module Endpoints
|
|
7
8
|
module Files
|
|
8
9
|
#
|
|
9
|
-
#
|
|
10
|
+
# Deletes a file.
|
|
10
11
|
#
|
|
11
12
|
# @option options [file] :file
|
|
12
13
|
# ID of file to delete.
|
|
@@ -35,7 +36,7 @@ module Slack
|
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
#
|
|
38
|
-
#
|
|
39
|
+
# Gets information about a team file.
|
|
39
40
|
#
|
|
40
41
|
# @option options [file] :file
|
|
41
42
|
# Specify a file by providing its ID.
|
|
@@ -57,7 +58,7 @@ module Slack
|
|
|
57
58
|
end
|
|
58
59
|
|
|
59
60
|
#
|
|
60
|
-
#
|
|
61
|
+
# Lists & filters team files.
|
|
61
62
|
#
|
|
62
63
|
# @option options [channel] :channel
|
|
63
64
|
# Filter files appearing in a specific channel, indicated by its ID.
|
|
@@ -78,7 +79,7 @@ module Slack
|
|
|
78
79
|
end
|
|
79
80
|
|
|
80
81
|
#
|
|
81
|
-
#
|
|
82
|
+
# Revokes public/external sharing access for a file
|
|
82
83
|
#
|
|
83
84
|
# @option options [file] :file
|
|
84
85
|
# File to revoke.
|
|
@@ -106,7 +107,7 @@ module Slack
|
|
|
106
107
|
end
|
|
107
108
|
|
|
108
109
|
#
|
|
109
|
-
#
|
|
110
|
+
# Enables a file for public/external sharing.
|
|
110
111
|
#
|
|
111
112
|
# @option options [file] :file
|
|
112
113
|
# File to share.
|
|
@@ -118,7 +119,7 @@ module Slack
|
|
|
118
119
|
end
|
|
119
120
|
|
|
120
121
|
#
|
|
121
|
-
#
|
|
122
|
+
# Uploads or creates a file.
|
|
122
123
|
#
|
|
123
124
|
# @option options [Object] :channels
|
|
124
125
|
# Comma-separated list of channel names or IDs where the file will be shared.
|
|
@@ -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,7 +7,7 @@ module Slack
|
|
|
6
7
|
module Endpoints
|
|
7
8
|
module FilesComments
|
|
8
9
|
#
|
|
9
|
-
#
|
|
10
|
+
# Deletes an existing comment on a file.
|
|
10
11
|
#
|
|
11
12
|
# @option options [file] :file
|
|
12
13
|
# File to delete a comment from.
|
|
@@ -0,0 +1,127 @@
|
|
|
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 FilesRemote
|
|
9
|
+
#
|
|
10
|
+
# Adds a file from a remote service
|
|
11
|
+
#
|
|
12
|
+
# @option options [Object] :external_id
|
|
13
|
+
# Creator defined GUID for the file.
|
|
14
|
+
# @option options [Object] :external_url
|
|
15
|
+
# URL of the remote file.
|
|
16
|
+
# @option options [Object] :title
|
|
17
|
+
# Title of the file being shared.
|
|
18
|
+
# @option options [Object] :filetype
|
|
19
|
+
# type of file.
|
|
20
|
+
# @option options [Object] :indexable_file_contents
|
|
21
|
+
# File containing contents that can be used to improve searchability for the remote file.
|
|
22
|
+
# @option options [Object] :preview_image
|
|
23
|
+
# Preview of the document via multipart/form-data.
|
|
24
|
+
# @see https://api.slack.com/methods/files.remote.add
|
|
25
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.add.json
|
|
26
|
+
def files_remote_add(options = {})
|
|
27
|
+
throw ArgumentError.new('Required arguments :external_id missing') if options[:external_id].nil?
|
|
28
|
+
throw ArgumentError.new('Required arguments :external_url missing') if options[:external_url].nil?
|
|
29
|
+
throw ArgumentError.new('Required arguments :title missing') if options[:title].nil?
|
|
30
|
+
post('files.remote.add', options)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
#
|
|
34
|
+
# Retrieve information about a remote file added to Slack
|
|
35
|
+
#
|
|
36
|
+
# @option options [Object] :external_id
|
|
37
|
+
# Creator defined GUID for the file.
|
|
38
|
+
# @option options [file] :file
|
|
39
|
+
# Specify a file by providing its ID.
|
|
40
|
+
# @see https://api.slack.com/methods/files.remote.info
|
|
41
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.info.json
|
|
42
|
+
def files_remote_info(options = {})
|
|
43
|
+
post('files.remote.info', options)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
#
|
|
47
|
+
# Retrieve information about a remote file added to Slack
|
|
48
|
+
#
|
|
49
|
+
# @option options [channel] :channel
|
|
50
|
+
# Filter files appearing in a specific channel, indicated by its ID.
|
|
51
|
+
# @option options [Object] :cursor
|
|
52
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
|
53
|
+
# @option options [Object] :limit
|
|
54
|
+
# The maximum number of items to return.
|
|
55
|
+
# @option options [Object] :ts_from
|
|
56
|
+
# Filter files created after this timestamp (inclusive).
|
|
57
|
+
# @option options [Object] :ts_to
|
|
58
|
+
# Filter files created before this timestamp (inclusive).
|
|
59
|
+
# @see https://api.slack.com/methods/files.remote.list
|
|
60
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.list.json
|
|
61
|
+
def files_remote_list(options = {})
|
|
62
|
+
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
|
|
63
|
+
if block_given?
|
|
64
|
+
Pagination::Cursor.new(self, :files_remote_list, options).each do |page|
|
|
65
|
+
yield page
|
|
66
|
+
end
|
|
67
|
+
else
|
|
68
|
+
post('files.remote.list', options)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
#
|
|
73
|
+
# Remove a remote file.
|
|
74
|
+
#
|
|
75
|
+
# @option options [Object] :external_id
|
|
76
|
+
# Creator defined GUID for the file.
|
|
77
|
+
# @option options [file] :file
|
|
78
|
+
# Specify a file by providing its ID.
|
|
79
|
+
# @see https://api.slack.com/methods/files.remote.remove
|
|
80
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.remove.json
|
|
81
|
+
def files_remote_remove(options = {})
|
|
82
|
+
post('files.remote.remove', options)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
#
|
|
86
|
+
# Share a remote file into a channel.
|
|
87
|
+
#
|
|
88
|
+
# @option options [Object] :channels
|
|
89
|
+
# Comma-separated list of channel IDs where the file will be shared.
|
|
90
|
+
# @option options [Object] :external_id
|
|
91
|
+
# Creator defined GUID for the file.
|
|
92
|
+
# @option options [file] :file
|
|
93
|
+
# Specify a file by providing its ID.
|
|
94
|
+
# @see https://api.slack.com/methods/files.remote.share
|
|
95
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.share.json
|
|
96
|
+
def files_remote_share(options = {})
|
|
97
|
+
throw ArgumentError.new('Required arguments :channels missing') if options[:channels].nil?
|
|
98
|
+
post('files.remote.share', options)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
#
|
|
102
|
+
# Updates an existing remote file.
|
|
103
|
+
#
|
|
104
|
+
# @option options [Object] :external_id
|
|
105
|
+
# Creator defined GUID for the file.
|
|
106
|
+
# @option options [Object] :external_url
|
|
107
|
+
# URL of the remote file.
|
|
108
|
+
# @option options [file] :file
|
|
109
|
+
# Specify a file by providing its ID.
|
|
110
|
+
# @option options [Object] :filetype
|
|
111
|
+
# type of file.
|
|
112
|
+
# @option options [Object] :indexable_file_contents
|
|
113
|
+
# File containing contents that can be used to improve searchability for the remote file.
|
|
114
|
+
# @option options [Object] :preview_image
|
|
115
|
+
# Preview of the document via multipart/form-data.
|
|
116
|
+
# @option options [Object] :title
|
|
117
|
+
# Title of the file being shared.
|
|
118
|
+
# @see https://api.slack.com/methods/files.remote.update
|
|
119
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.update.json
|
|
120
|
+
def files_remote_update(options = {})
|
|
121
|
+
post('files.remote.update', options)
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|