slack-ruby-client 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +3 -0
  4. data/.rubocop_todo.yml +30 -34
  5. data/.travis.yml +0 -1
  6. data/CHANGELOG.md +9 -0
  7. data/CONTRIBUTING.md +2 -2
  8. data/Gemfile +3 -1
  9. data/README.md +1 -1
  10. data/Rakefile +1 -1
  11. data/bin/commands/channels.rb +18 -9
  12. data/bin/commands/chat.rb +24 -3
  13. data/bin/commands/dialog.rb +14 -0
  14. data/bin/commands/files.rb +21 -0
  15. data/bin/commands/groups.rb +10 -10
  16. data/bin/commands/migration.rb +14 -0
  17. data/bin/commands/rtm.rb +2 -4
  18. data/bin/commands/users.rb +18 -18
  19. data/bin/commands/users_admin.rb +28 -0
  20. data/bin/commands/users_prefs.rb +12 -0
  21. data/bin/commands.rb +5 -1
  22. data/bin/slack +1 -1
  23. data/examples/hi_real_time/hi.rb +1 -1
  24. data/examples/hi_real_time_and_web/hi.rb +1 -1
  25. data/examples/hi_real_time_async_celluloid/hi.rb +1 -1
  26. data/examples/hi_real_time_async_eventmachine/hi.rb +1 -1
  27. data/examples/hi_web/hi.rb +1 -1
  28. data/examples/new_ticket/new_ticket.rb +1 -1
  29. data/lib/slack/messages/formatting.rb +4 -4
  30. data/lib/slack/messages/message.rb +1 -2
  31. data/lib/slack/real_time/api/templates/event_handler.erb +1 -1
  32. data/lib/slack/real_time/client.rb +10 -9
  33. data/lib/slack/real_time/concurrency/celluloid.rb +5 -1
  34. data/lib/slack/real_time/config.rb +11 -11
  35. data/lib/slack/real_time/models/base.rb +1 -2
  36. data/lib/slack/real_time/socket.rb +2 -2
  37. data/lib/slack/real_time/stores/base.rb +1 -2
  38. data/lib/slack/real_time/stores/starter.rb +76 -76
  39. data/lib/slack/real_time/stores/store.rb +104 -94
  40. data/lib/slack/version.rb +1 -1
  41. data/lib/slack/web/api/endpoints/api.rb +1 -1
  42. data/lib/slack/web/api/endpoints/apps_permissions.rb +2 -2
  43. data/lib/slack/web/api/endpoints/auth.rb +2 -2
  44. data/lib/slack/web/api/endpoints/bots.rb +1 -1
  45. data/lib/slack/web/api/endpoints/channels.rb +27 -15
  46. data/lib/slack/web/api/endpoints/chat.rb +42 -9
  47. data/lib/slack/web/api/endpoints/conversations.rb +17 -17
  48. data/lib/slack/web/api/endpoints/dialog.rb +32 -0
  49. data/lib/slack/web/api/endpoints/dnd.rb +5 -5
  50. data/lib/slack/web/api/endpoints/emoji.rb +1 -1
  51. data/lib/slack/web/api/endpoints/files.rb +37 -6
  52. data/lib/slack/web/api/endpoints/files_comments.rb +3 -3
  53. data/lib/slack/web/api/endpoints/groups.rb +17 -17
  54. data/lib/slack/web/api/endpoints/im.rb +6 -6
  55. data/lib/slack/web/api/endpoints/migration.rb +25 -0
  56. data/lib/slack/web/api/endpoints/mpim.rb +6 -6
  57. data/lib/slack/web/api/endpoints/oauth.rb +2 -2
  58. data/lib/slack/web/api/endpoints/pins.rb +3 -3
  59. data/lib/slack/web/api/endpoints/presence.rb +1 -1
  60. data/lib/slack/web/api/endpoints/reactions.rb +4 -4
  61. data/lib/slack/web/api/endpoints/reminders.rb +5 -5
  62. data/lib/slack/web/api/endpoints/rtm.rb +3 -7
  63. data/lib/slack/web/api/endpoints/search.rb +3 -3
  64. data/lib/slack/web/api/endpoints/stars.rb +3 -3
  65. data/lib/slack/web/api/endpoints/team.rb +4 -4
  66. data/lib/slack/web/api/endpoints/team_profile.rb +1 -1
  67. data/lib/slack/web/api/endpoints/usergroups.rb +5 -5
  68. data/lib/slack/web/api/endpoints/usergroups_users.rb +2 -2
  69. data/lib/slack/web/api/endpoints/users.rb +8 -8
  70. data/lib/slack/web/api/endpoints/users_admin.rb +46 -0
  71. data/lib/slack/web/api/endpoints/users_prefs.rb +19 -0
  72. data/lib/slack/web/api/endpoints/users_profile.rb +2 -2
  73. data/lib/slack/web/api/endpoints.rb +10 -2
  74. data/lib/slack/web/api/mixins/ids.id.rb +1 -1
  75. data/lib/slack/web/api/mixins/users.search.rb +38 -36
  76. data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +1 -1
  77. data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +1 -1
  78. data/lib/slack/web/api/patches/dialog.1.open-json-support.patch +17 -0
  79. data/lib/slack/web/api/templates/command.erb +2 -1
  80. data/lib/slack/web/api/templates/commands.erb +1 -1
  81. data/lib/slack/web/api/templates/endpoints.erb +2 -2
  82. data/lib/slack/web/api/templates/method.erb +8 -3
  83. data/lib/slack/web/api/templates/method_spec.erb +1 -1
  84. data/lib/slack/web/config.rb +12 -12
  85. data/lib/slack/web/faraday/response/raise_error.rb +3 -3
  86. data/lib/tasks/git.rake +1 -1
  87. data/lib/tasks/real_time.rake +1 -1
  88. data/lib/tasks/web.rake +4 -1
  89. data/slack-ruby-client.gemspec +2 -3
  90. data/spec/slack/messages/formatting_spec.rb +1 -1
  91. data/spec/slack/real_time/client_spec.rb +3 -2
  92. data/spec/slack/real_time/concurrency/celluloid_spec.rb +1 -1
  93. data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +1 -1
  94. data/spec/slack/real_time/event_handlers/bot_spec.rb +4 -2
  95. data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +1 -1
  96. data/spec/slack/real_time/event_handlers/user_spec.rb +4 -2
  97. data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +28 -0
  98. data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +8 -6
  99. data/spec/slack/web/api/endpoints/files_spec.rb +16 -0
  100. data/spec/slack/web/api/endpoints/migration_spec.rb +12 -0
  101. data/spec/slack/web/api/endpoints/users_admin_spec.rb +17 -0
  102. data/spec/slack/web/api/endpoints/users_prefs_spec.rb +7 -0
  103. data/spec/slack/web/api/error_spec.rb +1 -1
  104. data/spec/slack/web/api/errors/slack_error_spec.rb +1 -1
  105. data/spec/slack/web/api/mixins/users_spec.rb +6 -4
  106. data/spec/support/queue_with_timeout.rb +1 -1
  107. data/spec/support/real_time/concurrency/mock.rb +1 -2
  108. metadata +34 -31
@@ -0,0 +1,32 @@
1
+ # This file was auto-generated by lib/tasks/web.rake
2
+
3
+ module Slack
4
+ module Web
5
+ module Api
6
+ module Endpoints
7
+ module Dialog
8
+ #
9
+ # Open a dialog with a user
10
+ #
11
+ # @option options [Object] :dialog
12
+ # The dialog definition. This must be a JSON-encoded string.
13
+ # @option options [Object] :trigger_id
14
+ # Exchange a trigger to post to the user.
15
+ # @see https://api.slack.com/methods/dialog.open
16
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dialog/dialog.open.json
17
+ def dialog_open(options = {})
18
+ throw ArgumentError.new('Required arguments :dialog missing') if options[:dialog].nil?
19
+ throw ArgumentError.new('Required arguments :trigger_id missing') if options[:trigger_id].nil?
20
+ # dialog must be passed as an encoded JSON string
21
+ if options.key?(:dialog)
22
+ dialog = options[:dialog]
23
+ dialog = JSON.dump(dialog) unless dialog.is_a?(String)
24
+ options = options.merge(dialog: dialog)
25
+ end
26
+ post('dialog.open', options)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -9,7 +9,7 @@ module Slack
9
9
  # Ends the current user's Do Not Disturb session immediately.
10
10
  #
11
11
  # @see https://api.slack.com/methods/dnd.endDnd
12
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.endDnd.json
12
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.endDnd.json
13
13
  def dnd_endDnd(options = {})
14
14
  post('dnd.endDnd', options)
15
15
  end
@@ -18,7 +18,7 @@ module Slack
18
18
  # Ends the current user's snooze mode immediately.
19
19
  #
20
20
  # @see https://api.slack.com/methods/dnd.endSnooze
21
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.endSnooze.json
21
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.endSnooze.json
22
22
  def dnd_endSnooze(options = {})
23
23
  post('dnd.endSnooze', options)
24
24
  end
@@ -29,7 +29,7 @@ module Slack
29
29
  # @option options [user] :user
30
30
  # User to fetch status for (defaults to current user).
31
31
  # @see https://api.slack.com/methods/dnd.info
32
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.info.json
32
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.info.json
33
33
  def dnd_info(options = {})
34
34
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
35
35
  post('dnd.info', options)
@@ -41,7 +41,7 @@ module Slack
41
41
  # @option options [Object] :num_minutes
42
42
  # Number of minutes, from now, to snooze until.
43
43
  # @see https://api.slack.com/methods/dnd.setSnooze
44
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.setSnooze.json
44
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.setSnooze.json
45
45
  def dnd_setSnooze(options = {})
46
46
  throw ArgumentError.new('Required arguments :num_minutes missing') if options[:num_minutes].nil?
47
47
  post('dnd.setSnooze', options)
@@ -53,7 +53,7 @@ module Slack
53
53
  # @option options [Object] :users
54
54
  # Comma-separated list of users to fetch Do Not Disturb status for.
55
55
  # @see https://api.slack.com/methods/dnd.teamInfo
56
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.teamInfo.json
56
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.teamInfo.json
57
57
  def dnd_teamInfo(options = {})
58
58
  post('dnd.teamInfo', options)
59
59
  end
@@ -9,7 +9,7 @@ module Slack
9
9
  # Lists custom emoji for a team.
10
10
  #
11
11
  # @see https://api.slack.com/methods/emoji.list
12
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/emoji/emoji.list.json
12
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/emoji/emoji.list.json
13
13
  def emoji_list(options = {})
14
14
  post('emoji.list', options)
15
15
  end
@@ -11,19 +11,35 @@ module Slack
11
11
  # @option options [file] :file
12
12
  # ID of file to delete.
13
13
  # @see https://api.slack.com/methods/files.delete
14
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.delete.json
14
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.delete.json
15
15
  def files_delete(options = {})
16
16
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
17
17
  post('files.delete', options)
18
18
  end
19
19
 
20
+ #
21
+ # Change the properties of a file (undocumented)
22
+ #
23
+ # @option options [Object] :file
24
+ # ID of the file to be edited
25
+ # @option options [Object] :title
26
+ # New title of the file
27
+ # @option options [Object] :filetype
28
+ # New filetype of the file. See https://api.slack.com/types/file#file_types for a list of all supported types.
29
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/files/files.edit.json
30
+ def files_edit(options = {})
31
+ throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
32
+ throw ArgumentError.new('Required arguments :title missing') if options[:title].nil?
33
+ post('files.edit', options)
34
+ end
35
+
20
36
  #
21
37
  # Gets information about a team file.
22
38
  #
23
39
  # @option options [file] :file
24
40
  # Specify a file by providing its ID.
25
41
  # @see https://api.slack.com/methods/files.info
26
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.info.json
42
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.info.json
27
43
  def files_info(options = {})
28
44
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
29
45
  post('files.info', options)
@@ -55,7 +71,7 @@ module Slack
55
71
  # @option options [user] :user
56
72
  # Filter files created by a single user.
57
73
  # @see https://api.slack.com/methods/files.list
58
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.list.json
74
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.list.json
59
75
  def files_list(options = {})
60
76
  options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
61
77
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
@@ -68,19 +84,34 @@ module Slack
68
84
  # @option options [file] :file
69
85
  # File to revoke.
70
86
  # @see https://api.slack.com/methods/files.revokePublicURL
71
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.revokePublicURL.json
87
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.revokePublicURL.json
72
88
  def files_revokePublicURL(options = {})
73
89
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
74
90
  post('files.revokePublicURL', options)
75
91
  end
76
92
 
93
+ #
94
+ # Share an existing file in a channel (undocumented)
95
+ #
96
+ # @option options [Object] :file
97
+ # ID of the file to be shared
98
+ # @option options [channel] :channel
99
+ # Channel to share the file in. Works with both public (channel ID) and private channels (group ID).
100
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/files/files.share.json
101
+ def files_share(options = {})
102
+ throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
103
+ throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
104
+ options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
105
+ post('files.share', options)
106
+ end
107
+
77
108
  #
78
109
  # Enables a file for public/external sharing.
79
110
  #
80
111
  # @option options [file] :file
81
112
  # File to share.
82
113
  # @see https://api.slack.com/methods/files.sharedPublicURL
83
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.sharedPublicURL.json
114
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.sharedPublicURL.json
84
115
  def files_sharedPublicURL(options = {})
85
116
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
86
117
  post('files.sharedPublicURL', options)
@@ -104,7 +135,7 @@ module Slack
104
135
  # @option options [Object] :title
105
136
  # Title of file.
106
137
  # @see https://api.slack.com/methods/files.upload
107
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.upload.json
138
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.upload.json
108
139
  def files_upload(options = {})
109
140
  post('files.upload', options)
110
141
  end
@@ -13,7 +13,7 @@ module Slack
13
13
  # @option options [file] :file
14
14
  # File to add a comment to.
15
15
  # @see https://api.slack.com/methods/files.comments.add
16
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.comments/files.comments.add.json
16
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.add.json
17
17
  def files_comments_add(options = {})
18
18
  throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil?
19
19
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
@@ -28,7 +28,7 @@ module Slack
28
28
  # @option options [Object] :id
29
29
  # The comment to delete.
30
30
  # @see https://api.slack.com/methods/files.comments.delete
31
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.comments/files.comments.delete.json
31
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.delete.json
32
32
  def files_comments_delete(options = {})
33
33
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
34
34
  throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
@@ -45,7 +45,7 @@ module Slack
45
45
  # @option options [Object] :id
46
46
  # The comment to edit.
47
47
  # @see https://api.slack.com/methods/files.comments.edit
48
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.comments/files.comments.edit.json
48
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.edit.json
49
49
  def files_comments_edit(options = {})
50
50
  throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil?
51
51
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
@@ -11,7 +11,7 @@ module Slack
11
11
  # @option options [group] :channel
12
12
  # Private channel to archive.
13
13
  # @see https://api.slack.com/methods/groups.archive
14
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.archive.json
14
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.archive.json
15
15
  def groups_archive(options = {})
16
16
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
17
17
  options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
@@ -26,7 +26,7 @@ module Slack
26
26
  # @option options [Object] :validate
27
27
  # Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.
28
28
  # @see https://api.slack.com/methods/groups.create
29
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.create.json
29
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.create.json
30
30
  def groups_create(options = {})
31
31
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
32
32
  post('groups.create', options)
@@ -38,7 +38,7 @@ module Slack
38
38
  # @option options [group] :channel
39
39
  # Private channel to clone and archive.
40
40
  # @see https://api.slack.com/methods/groups.createChild
41
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.createChild.json
41
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.createChild.json
42
42
  def groups_createChild(options = {})
43
43
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
44
44
  options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
@@ -59,7 +59,7 @@ module Slack
59
59
  # @option options [Object] :unreads
60
60
  # Include unread_count_display in the output?.
61
61
  # @see https://api.slack.com/methods/groups.history
62
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.history.json
62
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.history.json
63
63
  def groups_history(options = {})
64
64
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
65
65
  options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
@@ -74,7 +74,7 @@ module Slack
74
74
  # @option options [Object] :include_locale
75
75
  # Set this to true to receive the locale for this group. Defaults to false.
76
76
  # @see https://api.slack.com/methods/groups.info
77
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.info.json
77
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.info.json
78
78
  def groups_info(options = {})
79
79
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
80
80
  options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
@@ -89,7 +89,7 @@ module Slack
89
89
  # @option options [user] :user
90
90
  # User to invite.
91
91
  # @see https://api.slack.com/methods/groups.invite
92
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.invite.json
92
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.invite.json
93
93
  def groups_invite(options = {})
94
94
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
95
95
  throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
@@ -106,7 +106,7 @@ module Slack
106
106
  # @option options [user] :user
107
107
  # User to remove from private channel.
108
108
  # @see https://api.slack.com/methods/groups.kick
109
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.kick.json
109
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.kick.json
110
110
  def groups_kick(options = {})
111
111
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
112
112
  throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
@@ -121,7 +121,7 @@ module Slack
121
121
  # @option options [group] :channel
122
122
  # Private channel to leave.
123
123
  # @see https://api.slack.com/methods/groups.leave
124
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.leave.json
124
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.leave.json
125
125
  def groups_leave(options = {})
126
126
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
127
127
  options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
@@ -134,9 +134,9 @@ module Slack
134
134
  # @option options [Object] :exclude_archived
135
135
  # Don't return archived private channels.
136
136
  # @option options [Object] :exclude_members
137
- # Exlude the members from each group.
137
+ # Exclude the members from each group.
138
138
  # @see https://api.slack.com/methods/groups.list
139
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.list.json
139
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.list.json
140
140
  def groups_list(options = {})
141
141
  post('groups.list', options)
142
142
  end
@@ -149,7 +149,7 @@ module Slack
149
149
  # @option options [timestamp] :ts
150
150
  # Timestamp of the most recently seen message.
151
151
  # @see https://api.slack.com/methods/groups.mark
152
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.mark.json
152
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.mark.json
153
153
  def groups_mark(options = {})
154
154
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
155
155
  throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil?
@@ -163,7 +163,7 @@ module Slack
163
163
  # @option options [group] :channel
164
164
  # Private channel to open.
165
165
  # @see https://api.slack.com/methods/groups.open
166
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.open.json
166
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.open.json
167
167
  def groups_open(options = {})
168
168
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
169
169
  options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
@@ -180,7 +180,7 @@ module Slack
180
180
  # @option options [Object] :validate
181
181
  # Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.
182
182
  # @see https://api.slack.com/methods/groups.rename
183
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.rename.json
183
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.rename.json
184
184
  def groups_rename(options = {})
185
185
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
186
186
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
@@ -196,7 +196,7 @@ module Slack
196
196
  # @option options [Object] :thread_ts
197
197
  # Unique identifier of a thread's parent message.
198
198
  # @see https://api.slack.com/methods/groups.replies
199
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.replies.json
199
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.replies.json
200
200
  def groups_replies(options = {})
201
201
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
202
202
  throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil?
@@ -212,7 +212,7 @@ module Slack
212
212
  # @option options [Object] :purpose
213
213
  # The new purpose.
214
214
  # @see https://api.slack.com/methods/groups.setPurpose
215
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.setPurpose.json
215
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.setPurpose.json
216
216
  def groups_setPurpose(options = {})
217
217
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
218
218
  throw ArgumentError.new('Required arguments :purpose missing') if options[:purpose].nil?
@@ -228,7 +228,7 @@ module Slack
228
228
  # @option options [Object] :topic
229
229
  # The new topic.
230
230
  # @see https://api.slack.com/methods/groups.setTopic
231
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.setTopic.json
231
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.setTopic.json
232
232
  def groups_setTopic(options = {})
233
233
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
234
234
  throw ArgumentError.new('Required arguments :topic missing') if options[:topic].nil?
@@ -242,7 +242,7 @@ module Slack
242
242
  # @option options [group] :channel
243
243
  # Private channel to unarchive.
244
244
  # @see https://api.slack.com/methods/groups.unarchive
245
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.unarchive.json
245
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.unarchive.json
246
246
  def groups_unarchive(options = {})
247
247
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
248
248
  options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
@@ -11,7 +11,7 @@ module Slack
11
11
  # @option options [im] :channel
12
12
  # Direct message channel to close.
13
13
  # @see https://api.slack.com/methods/im.close
14
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.close.json
14
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.close.json
15
15
  def im_close(options = {})
16
16
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
17
17
  options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
@@ -32,7 +32,7 @@ module Slack
32
32
  # @option options [Object] :unreads
33
33
  # Include unread_count_display in the output?.
34
34
  # @see https://api.slack.com/methods/im.history
35
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.history.json
35
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.history.json
36
36
  def im_history(options = {})
37
37
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
38
38
  options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
@@ -47,7 +47,7 @@ module Slack
47
47
  # @option options [Object] :limit
48
48
  # The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
49
49
  # @see https://api.slack.com/methods/im.list
50
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.list.json
50
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.list.json
51
51
  def im_list(options = {})
52
52
  if block_given?
53
53
  Pagination::Cursor.new(self, :im_list, options).each do |page|
@@ -66,7 +66,7 @@ module Slack
66
66
  # @option options [timestamp] :ts
67
67
  # Timestamp of the most recently seen message.
68
68
  # @see https://api.slack.com/methods/im.mark
69
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.mark.json
69
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.mark.json
70
70
  def im_mark(options = {})
71
71
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
72
72
  throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil?
@@ -84,7 +84,7 @@ module Slack
84
84
  # @option options [Object] :return_im
85
85
  # Boolean, indicates you want the full IM channel definition in the response.
86
86
  # @see https://api.slack.com/methods/im.open
87
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.open.json
87
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.open.json
88
88
  def im_open(options = {})
89
89
  throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
90
90
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
@@ -99,7 +99,7 @@ module Slack
99
99
  # @option options [Object] :thread_ts
100
100
  # Unique identifier of a thread's parent message.
101
101
  # @see https://api.slack.com/methods/im.replies
102
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.replies.json
102
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.replies.json
103
103
  def im_replies(options = {})
104
104
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
105
105
  throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil?
@@ -0,0 +1,25 @@
1
+ # This file was auto-generated by lib/tasks/web.rake
2
+
3
+ module Slack
4
+ module Web
5
+ module Api
6
+ module Endpoints
7
+ module Migration
8
+ #
9
+ # For Enterprise Grid workspaces, map local user IDs to global user IDs
10
+ #
11
+ # @option options [Object] :users
12
+ # A comma-separated list of user ids, up to 400 per request.
13
+ # @option options [Object] :to_old
14
+ # Specify true to convert W global user IDs to workspace-specific U IDs. Defaults to false.
15
+ # @see https://api.slack.com/methods/migration.exchange
16
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/migration/migration.exchange.json
17
+ def migration_exchange(options = {})
18
+ throw ArgumentError.new('Required arguments :users missing') if options[:users].nil?
19
+ post('migration.exchange', options)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -11,7 +11,7 @@ module Slack
11
11
  # @option options [channel] :channel
12
12
  # MPIM to close.
13
13
  # @see https://api.slack.com/methods/mpim.close
14
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.close.json
14
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.close.json
15
15
  def mpim_close(options = {})
16
16
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
17
17
  options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
@@ -32,7 +32,7 @@ module Slack
32
32
  # @option options [Object] :unreads
33
33
  # Include unread_count_display in the output?.
34
34
  # @see https://api.slack.com/methods/mpim.history
35
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.history.json
35
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.history.json
36
36
  def mpim_history(options = {})
37
37
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
38
38
  options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
@@ -43,7 +43,7 @@ module Slack
43
43
  # Lists multiparty direct message channels for the calling user.
44
44
  #
45
45
  # @see https://api.slack.com/methods/mpim.list
46
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.list.json
46
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.list.json
47
47
  def mpim_list(options = {})
48
48
  post('mpim.list', options)
49
49
  end
@@ -56,7 +56,7 @@ module Slack
56
56
  # @option options [timestamp] :ts
57
57
  # Timestamp of the most recently seen message.
58
58
  # @see https://api.slack.com/methods/mpim.mark
59
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.mark.json
59
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.mark.json
60
60
  def mpim_mark(options = {})
61
61
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
62
62
  throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil?
@@ -70,7 +70,7 @@ module Slack
70
70
  # @option options [Object] :users
71
71
  # Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned.
72
72
  # @see https://api.slack.com/methods/mpim.open
73
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.open.json
73
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.open.json
74
74
  def mpim_open(options = {})
75
75
  throw ArgumentError.new('Required arguments :users missing') if options[:users].nil?
76
76
  post('mpim.open', options)
@@ -84,7 +84,7 @@ module Slack
84
84
  # @option options [Object] :thread_ts
85
85
  # Unique identifier of a thread's parent message.
86
86
  # @see https://api.slack.com/methods/mpim.replies
87
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.replies.json
87
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.replies.json
88
88
  def mpim_replies(options = {})
89
89
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
90
90
  throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil?