Module: Slack::Web::Api::Endpoints::AdminConversations
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/admin_conversations.rb
Instance Method Summary collapse
-
#admin_conversations_archive(options = {}) ⇒ Object
Archive a public or private channel.
-
#admin_conversations_bulkArchive(options = {}) ⇒ Object
Archive public or private channels in bulk.
-
#admin_conversations_bulkDelete(options = {}) ⇒ Object
Delete public or private channels in bulk.
-
#admin_conversations_bulkMove(options = {}) ⇒ Object
Move public or private channels in bulk.
-
#admin_conversations_convertToPrivate(options = {}) ⇒ Object
Convert a public channel to a private channel.
-
#admin_conversations_convertToPublic(options = {}) ⇒ Object
Convert a private channel to a public channel.
-
#admin_conversations_create(options = {}) ⇒ Object
Create a public or private channel-based conversation.
-
#admin_conversations_delete(options = {}) ⇒ Object
Delete a public or private channel.
-
#admin_conversations_disconnectShared(options = {}) ⇒ Object
Disconnect a connected channel from one or more workspaces.
-
#admin_conversations_getConversationPrefs(options = {}) ⇒ Object
Get conversation preferences for a public or private channel.
-
#admin_conversations_getCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to get a conversation’s retention policy.
-
#admin_conversations_getTeams(options = {}) ⇒ Object
Get all the workspaces a given public or private channel is connected to within this Enterprise org.
-
#admin_conversations_invite(options = {}) ⇒ Object
Invite a user to a public or private channel.
-
#admin_conversations_lookup(options = {}) ⇒ Object
Returns channels on the given team using the filters.
-
#admin_conversations_removeCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to remove a conversation’s retention policy.
-
#admin_conversations_rename(options = {}) ⇒ Object
Rename a public or private channel.
-
#admin_conversations_search(options = {}) ⇒ Object
Search for public or private channels in an Enterprise organization.
-
#admin_conversations_setConversationPrefs(options = {}) ⇒ Object
Set the posting permissions for a public or private channel.
-
#admin_conversations_setCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to set a conversation’s retention policy.
-
#admin_conversations_setTeams(options = {}) ⇒ Object
Set the workspaces in an Enterprise grid org that connect to a public or private channel.
-
#admin_conversations_unarchive(options = {}) ⇒ Object
Unarchive a public or private channel.
Instance Method Details
#admin_conversations_archive(options = {}) ⇒ Object
Archive a public or private channel.
16 17 18 19 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 16 def admin_conversations_archive( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.archive', ) end |
#admin_conversations_bulkArchive(options = {}) ⇒ Object
Archive public or private channels in bulk.
28 29 30 31 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 28 def admin_conversations_bulkArchive( = {}) raise ArgumentError, 'Required arguments :channel_ids missing' if [:channel_ids].nil? post('admin.conversations.bulkArchive', ) end |
#admin_conversations_bulkDelete(options = {}) ⇒ Object
Delete public or private channels in bulk
40 41 42 43 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 40 def admin_conversations_bulkDelete( = {}) raise ArgumentError, 'Required arguments :channel_ids missing' if [:channel_ids].nil? post('admin.conversations.bulkDelete', ) end |
#admin_conversations_bulkMove(options = {}) ⇒ Object
Move public or private channels in bulk.
54 55 56 57 58 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 54 def admin_conversations_bulkMove( = {}) raise ArgumentError, 'Required arguments :channel_ids missing' if [:channel_ids].nil? raise ArgumentError, 'Required arguments :target_team_id missing' if [:target_team_id].nil? post('admin.conversations.bulkMove', ) end |
#admin_conversations_convertToPrivate(options = {}) ⇒ Object
Convert a public channel to a private channel.
69 70 71 72 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 69 def admin_conversations_convertToPrivate( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.convertToPrivate', ) end |
#admin_conversations_convertToPublic(options = {}) ⇒ Object
Convert a private channel to a public channel.
81 82 83 84 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 81 def admin_conversations_convertToPublic( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.convertToPublic', ) end |
#admin_conversations_create(options = {}) ⇒ Object
Create a public or private channel-based conversation.
101 102 103 104 105 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 101 def admin_conversations_create( = {}) raise ArgumentError, 'Required arguments :is_private missing' if [:is_private].nil? raise ArgumentError, 'Required arguments :name missing' if [:name].nil? post('admin.conversations.create', ) end |
#admin_conversations_delete(options = {}) ⇒ Object
Delete a public or private channel.
114 115 116 117 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 114 def admin_conversations_delete( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.delete', ) end |
#admin_conversations_disconnectShared(options = {}) ⇒ Object
Disconnect a connected channel from one or more workspaces.
128 129 130 131 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 128 def admin_conversations_disconnectShared( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.disconnectShared', ) end |
#admin_conversations_getConversationPrefs(options = {}) ⇒ Object
Get conversation preferences for a public or private channel.
140 141 142 143 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 140 def admin_conversations_getConversationPrefs( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.getConversationPrefs', ) end |
#admin_conversations_getCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to get a conversation’s retention policy.
152 153 154 155 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 152 def admin_conversations_getCustomRetention( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.getCustomRetention', ) end |
#admin_conversations_getTeams(options = {}) ⇒ Object
Get all the workspaces a given public or private channel is connected to within this Enterprise org.
168 169 170 171 172 173 174 175 176 177 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 168 def admin_conversations_getTeams( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? if block_given? Pagination::Cursor.new(self, :admin_conversations_getTeams, ).each do |page| yield page end else post('admin.conversations.getTeams', ) end end |
#admin_conversations_invite(options = {}) ⇒ Object
Invite a user to a public or private channel.
188 189 190 191 192 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 188 def admin_conversations_invite( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? raise ArgumentError, 'Required arguments :user_ids missing' if [:user_ids].nil? post('admin.conversations.invite', ) end |
#admin_conversations_lookup(options = {}) ⇒ Object
Returns channels on the given team using the filters.
209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 209 def admin_conversations_lookup( = {}) raise ArgumentError, 'Required arguments :last_message_activity_before missing' if [:last_message_activity_before].nil? raise ArgumentError, 'Required arguments :team_ids missing' if [:team_ids].nil? if block_given? Pagination::Cursor.new(self, :admin_conversations_lookup, ).each do |page| yield page end else post('admin.conversations.lookup', ) end end |
#admin_conversations_removeCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to remove a conversation’s retention policy.
228 229 230 231 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 228 def admin_conversations_removeCustomRetention( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.removeCustomRetention', ) end |
#admin_conversations_rename(options = {}) ⇒ Object
Rename a public or private channel.
242 243 244 245 246 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 242 def admin_conversations_rename( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? raise ArgumentError, 'Required arguments :name missing' if [:name].nil? post('admin.conversations.rename', ) end |
#admin_conversations_search(options = {}) ⇒ Object
Search for public or private channels in an Enterprise organization.
271 272 273 274 275 276 277 278 279 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 271 def admin_conversations_search( = {}) if block_given? Pagination::Cursor.new(self, :admin_conversations_search, ).each do |page| yield page end else post('admin.conversations.search', ) end end |
#admin_conversations_setConversationPrefs(options = {}) ⇒ Object
Set the posting permissions for a public or private channel.
290 291 292 293 294 295 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 290 def admin_conversations_setConversationPrefs( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? raise ArgumentError, 'Required arguments :prefs missing' if [:prefs].nil? = (, %i[prefs]) post('admin.conversations.setConversationPrefs', ) end |
#admin_conversations_setCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to set a conversation’s retention policy.
306 307 308 309 310 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 306 def admin_conversations_setCustomRetention( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? raise ArgumentError, 'Required arguments :duration_days missing' if [:duration_days].nil? post('admin.conversations.setCustomRetention', ) end |
#admin_conversations_setTeams(options = {}) ⇒ Object
Set the workspaces in an Enterprise grid org that connect to a public or private channel.
325 326 327 328 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 325 def admin_conversations_setTeams( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.setTeams', ) end |
#admin_conversations_unarchive(options = {}) ⇒ Object
Unarchive a public or private channel.
337 338 339 340 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 337 def admin_conversations_unarchive( = {}) raise ArgumentError, 'Required arguments :channel_id missing' if [:channel_id].nil? post('admin.conversations.unarchive', ) end |