module Slack::Web::Api::Endpoints::AdminBarriers

Public Instance Methods

admin_barriers_create(options = {}) click to toggle source

Create an Information Barrier

@option options [Object] :barriered_from_usergroup_ids

A list of IDP Groups ids that the primary usergroup is to be barriered from.

@option options [Object] :primary_usergroup_id

The id of the primary IDP Group.

@option options [Object] :restricted_subjects

What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.

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

# File lib/slack/web/api/endpoints/admin_barriers.rb, line 20
def admin_barriers_create(options = {})
  throw ArgumentError.new('Required arguments :barriered_from_usergroup_ids missing') if options[:barriered_from_usergroup_ids].nil?
  throw ArgumentError.new('Required arguments :primary_usergroup_id missing') if options[:primary_usergroup_id].nil?
  throw ArgumentError.new('Required arguments :restricted_subjects missing') if options[:restricted_subjects].nil?
  post('admin.barriers.create', options)
end
admin_barriers_delete(options = {}) click to toggle source

Delete an existing Information Barrier

@option options [Object] :barrier_id

The ID of the barrier you're trying to delete.

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

# File lib/slack/web/api/endpoints/admin_barriers.rb, line 34
def admin_barriers_delete(options = {})
  throw ArgumentError.new('Required arguments :barrier_id missing') if options[:barrier_id].nil?
  post('admin.barriers.delete', options)
end
admin_barriers_list(options = {}) { |page| ... } click to toggle source

Get all Information Barriers for your organization

@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.barriers.list @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.barriers/admin.barriers.list.json

# File lib/slack/web/api/endpoints/admin_barriers.rb, line 48
def admin_barriers_list(options = {})
  if block_given?
    Pagination::Cursor.new(self, :admin_barriers_list, options).each do |page|
      yield page
    end
  else
    post('admin.barriers.list', options)
  end
end
admin_barriers_update(options = {}) click to toggle source

Update an existing Information Barrier

@option options [Object] :barrier_id

The ID of the barrier you're trying to modify.

@option options [Object] :barriered_from_usergroup_ids

A list of IDP Groups ids that the primary usergroup is to be barriered from.

@option options [Object] :primary_usergroup_id

The id of the primary IDP Group.

@option options [Object] :restricted_subjects

What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.

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

# File lib/slack/web/api/endpoints/admin_barriers.rb, line 71
def admin_barriers_update(options = {})
  throw ArgumentError.new('Required arguments :barrier_id missing') if options[:barrier_id].nil?
  throw ArgumentError.new('Required arguments :barriered_from_usergroup_ids missing') if options[:barriered_from_usergroup_ids].nil?
  throw ArgumentError.new('Required arguments :primary_usergroup_id missing') if options[:primary_usergroup_id].nil?
  throw ArgumentError.new('Required arguments :restricted_subjects missing') if options[:restricted_subjects].nil?
  post('admin.barriers.update', options)
end