module Slack::Web::Api::Endpoints::AdminConversations

Public Instance Methods

admin_conversations_archive(options = {}) click to toggle source

Archive a public or private channel.

@option options [Object] :channel_id

The channel to archive.

@see api.slack.com/methods/admin.conversations.archive @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.archive.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 16
def admin_conversations_archive(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  post('admin.conversations.archive', options)
end
admin_conversations_convertToPrivate(options = {}) click to toggle source

Convert a public channel to a private channel.

@option options [Object] :channel_id

The channel to convert to private.

@see api.slack.com/methods/admin.conversations.convertToPrivate @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.convertToPrivate.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 28
def admin_conversations_convertToPrivate(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  post('admin.conversations.convertToPrivate', options)
end
admin_conversations_create(options = {}) click to toggle source

Create a public or private channel-based conversation.

@option options [Object] :is_private

When true, creates a private channel instead of a public channel.

@option options [Object] :name

Name of the public or private channel to create.

@option options [Object] :description

Description of the public or private channel to create.

@option options [Object] :org_wide

When true, the channel will be available org-wide. Note: if the channel is not org_wide=true, you must specify a team_id for this channel.

@option options [Object] :team_id

The workspace to create the channel in. Note: this argument is required unless you set org_wide=true.

@see api.slack.com/methods/admin.conversations.create @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.create.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 48
def admin_conversations_create(options = {})
  throw ArgumentError.new('Required arguments :is_private missing') if options[:is_private].nil?
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
  post('admin.conversations.create', options)
end
admin_conversations_delete(options = {}) click to toggle source

Delete a public or private channel.

@option options [Object] :channel_id

The channel to delete.

@see api.slack.com/methods/admin.conversations.delete @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.delete.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 61
def admin_conversations_delete(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  post('admin.conversations.delete', options)
end
admin_conversations_getConversationPrefs(options = {}) click to toggle source

Get conversation preferences for a public or private channel.

@option options [Object] :channel_id

The channel to get preferences for.

@see api.slack.com/methods/admin.conversations.getConversationPrefs @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.getConversationPrefs.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 73
def admin_conversations_getConversationPrefs(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  post('admin.conversations.getConversationPrefs', options)
end
admin_conversations_getCustomRetention(options = {}) click to toggle source

This API endpoint can be used by any admin to get a channel's retention policy.

@option options [Object] :channel_id

The channel to get the retention policy for.

@see api.slack.com/methods/admin.conversations.getCustomRetention @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.getCustomRetention.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 85
def admin_conversations_getCustomRetention(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  post('admin.conversations.getCustomRetention', options)
end
admin_conversations_getTeams(options = {}) { |page| ... } click to toggle source

Get all the workspaces a given public or private channel is connected to within this Enterprise org.

@option options [Object] :channel_id

The channel to determine connected workspaces within the organization for.

@option options [Object] :cursor

Set cursor to next_cursor returned by the previous call to list items in the next page.

@option options [Object] :limit

The maximum number of items to return. Must be between 1 - 1000 both inclusive.

@see api.slack.com/methods/admin.conversations.getTeams @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.getTeams.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 101
def admin_conversations_getTeams(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  if block_given?
    Pagination::Cursor.new(self, :admin_conversations_getTeams, options).each do |page|
      yield page
    end
  else
    post('admin.conversations.getTeams', options)
  end
end
admin_conversations_invite(options = {}) click to toggle source

Invite a user to a public or private channel.

@option options [Object] :channel_id

The channel that the users will be invited to.

@option options [Object] :user_ids

The users to invite.

@see api.slack.com/methods/admin.conversations.invite @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.invite.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 121
def admin_conversations_invite(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
  post('admin.conversations.invite', options)
end
admin_conversations_removeCustomRetention(options = {}) click to toggle source

This API endpoint can be used by any admin to remove a channel's retention policy.

@option options [Object] :channel_id

The channel to set the retention policy for.

@see api.slack.com/methods/admin.conversations.removeCustomRetention @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.removeCustomRetention.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 134
def admin_conversations_removeCustomRetention(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  post('admin.conversations.removeCustomRetention', options)
end
admin_conversations_rename(options = {}) click to toggle source

Rename a public or private channel.

@option options [Object] :channel_id

The channel to rename.

@option options [Object] :name

.

@see api.slack.com/methods/admin.conversations.rename @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.rename.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 148
def admin_conversations_rename(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
  post('admin.conversations.rename', options)
end
admin_conversations_setConversationPrefs(options = {}) click to toggle source

Set the posting permissions for a public or private channel.

@option options [Object] :channel_id

The channel to set the prefs for.

@option options [Object] :prefs

The prefs for this channel in a stringified JSON format.

@see api.slack.com/methods/admin.conversations.setConversationPrefs @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setConversationPrefs.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 192
def admin_conversations_setConversationPrefs(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  throw ArgumentError.new('Required arguments :prefs missing') if options[:prefs].nil?
  post('admin.conversations.setConversationPrefs', options)
end
admin_conversations_setCustomRetention(options = {}) click to toggle source

This API endpoint can be used by any admin to set a channel's retention policy.

@option options [Object] :channel_id

The channel to set the retention policy for.

@option options [Object] :duration_days

The message retention duration in days to set for this channel.

@see api.slack.com/methods/admin.conversations.setCustomRetention @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setCustomRetention.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 207
def admin_conversations_setCustomRetention(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  throw ArgumentError.new('Required arguments :duration_days missing') if options[:duration_days].nil?
  post('admin.conversations.setCustomRetention', options)
end
admin_conversations_setTeams(options = {}) click to toggle source

Set the workspaces in an Enterprise grid org that connect to a public or private channel.

@option options [Object] :channel_id

The encoded channel_id to add or remove to workspaces.

@option options [Object] :org_channel

True if channel has to be converted to an org channel.

@option options [Object] :target_team_ids

A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.

@option options [Object] :team_id

The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.

@see api.slack.com/methods/admin.conversations.setTeams @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setTeams.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 226
def admin_conversations_setTeams(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  post('admin.conversations.setTeams', options)
end
admin_conversations_unarchive(options = {}) click to toggle source

Unarchive a public or private channel.

@option options [Object] :channel_id

The channel to unarchive.

@see api.slack.com/methods/admin.conversations.unarchive @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.unarchive.json

# File lib/slack/web/api/endpoints/admin_conversations.rb, line 238
def admin_conversations_unarchive(options = {})
  throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
  post('admin.conversations.unarchive', options)
end