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_convertToPrivate(options = {}) ⇒ Object
Convert a public channel to a private 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_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 channel’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_removeCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to remove a channel’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 channel’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( = {}) throw ArgumentError.new('Required arguments :channel_id missing') if [:channel_id].nil? post('admin.conversations.archive', ) end |
#admin_conversations_convertToPrivate(options = {}) ⇒ Object
Convert a public channel to a private channel.
28 29 30 31 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 28 def admin_conversations_convertToPrivate( = {}) throw ArgumentError.new('Required arguments :channel_id missing') if [:channel_id].nil? post('admin.conversations.convertToPrivate', ) end |
#admin_conversations_create(options = {}) ⇒ Object
Create a public or private channel-based conversation.
48 49 50 51 52 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 48 def admin_conversations_create( = {}) throw ArgumentError.new('Required arguments :is_private missing') if [:is_private].nil? throw ArgumentError.new('Required arguments :name missing') if [:name].nil? post('admin.conversations.create', ) end |
#admin_conversations_delete(options = {}) ⇒ Object
Delete a public or private channel.
61 62 63 64 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 61 def admin_conversations_delete( = {}) throw ArgumentError.new('Required arguments :channel_id missing') if [:channel_id].nil? post('admin.conversations.delete', ) end |
#admin_conversations_getConversationPrefs(options = {}) ⇒ Object
Get conversation preferences for a public or private channel.
73 74 75 76 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 73 def admin_conversations_getConversationPrefs( = {}) throw ArgumentError.new('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 channel’s retention policy.
85 86 87 88 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 85 def admin_conversations_getCustomRetention( = {}) throw ArgumentError.new('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.
101 102 103 104 105 106 107 108 109 110 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 101 def admin_conversations_getTeams( = {}) throw ArgumentError.new('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.
121 122 123 124 125 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 121 def admin_conversations_invite( = {}) throw ArgumentError.new('Required arguments :channel_id missing') if [:channel_id].nil? throw ArgumentError.new('Required arguments :user_ids missing') if [:user_ids].nil? post('admin.conversations.invite', ) end |
#admin_conversations_removeCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to remove a channel’s retention policy.
134 135 136 137 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 134 def admin_conversations_removeCustomRetention( = {}) throw ArgumentError.new('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.
148 149 150 151 152 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 148 def admin_conversations_rename( = {}) throw ArgumentError.new('Required arguments :channel_id missing') if [:channel_id].nil? throw ArgumentError.new('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.
173 174 175 176 177 178 179 180 181 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 173 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.
192 193 194 195 196 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 192 def admin_conversations_setConversationPrefs( = {}) throw ArgumentError.new('Required arguments :channel_id missing') if [:channel_id].nil? throw ArgumentError.new('Required arguments :prefs missing') if [:prefs].nil? post('admin.conversations.setConversationPrefs', ) end |
#admin_conversations_setCustomRetention(options = {}) ⇒ Object
This API endpoint can be used by any admin to set a channel’s retention policy.
207 208 209 210 211 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 207 def admin_conversations_setCustomRetention( = {}) throw ArgumentError.new('Required arguments :channel_id missing') if [:channel_id].nil? throw ArgumentError.new('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.
226 227 228 229 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 226 def admin_conversations_setTeams( = {}) throw ArgumentError.new('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.
238 239 240 241 |
# File 'lib/slack/web/api/endpoints/admin_conversations.rb', line 238 def admin_conversations_unarchive( = {}) throw ArgumentError.new('Required arguments :channel_id missing') if [:channel_id].nil? post('admin.conversations.unarchive', ) end |