slack-ruby/slack-ruby-client

View on GitHub
lib/slack/web/api/endpoints/admin_usergroups.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Web
    module Api
      module Endpoints
        module AdminUsergroups
          #
          # Add up to one hundred default channels to an IDP group.
          #
          # @option options [array] :channel_ids
          #   Comma separated string of channel IDs.
          # @option options [string] :usergroup_id
          #   ID of the IDP group to add default channels for.
          # @option options [string] :team_id
          #   The workspace to add default channels in.
          # @see https://api.slack.com/methods/admin.usergroups.addChannels
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addChannels.json
          def admin_usergroups_addChannels(options = {})
            raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
            raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
            post('admin.usergroups.addChannels', options)
          end

          #
          # Associate one or more default workspaces with an organization-wide IDP group.
          #
          # @option options [array] :team_ids
          #   A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.
          # @option options [string] :usergroup_id
          #   An encoded usergroup (IDP Group) ID.
          # @option options [boolean] :auto_provision
          #   When true, this method automatically creates new workspace accounts for the IDP group members.
          # @see https://api.slack.com/methods/admin.usergroups.addTeams
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addTeams.json
          def admin_usergroups_addTeams(options = {})
            raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
            raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
            post('admin.usergroups.addTeams', options)
          end

          #
          # List the channels linked to an org-level IDP group (user group).
          #
          # @option options [Object] :usergroup_id
          #   ID of the IDP group to list default channels for.
          # @option options [boolean] :include_num_members
          #   Flag to include or exclude the count of members per channel.
          # @option options [string] :team_id
          #   ID of the the workspace.
          # @see https://api.slack.com/methods/admin.usergroups.listChannels
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.listChannels.json
          def admin_usergroups_listChannels(options = {})
            raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
            post('admin.usergroups.listChannels', options)
          end

          #
          # Remove one or more default channels from an org-level IDP group (user group).
          #
          # @option options [array] :channel_ids
          #   Comma-separated string of channel IDs.
          # @option options [string] :usergroup_id
          #   ID of the IDP Group.
          # @see https://api.slack.com/methods/admin.usergroups.removeChannels
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.removeChannels.json
          def admin_usergroups_removeChannels(options = {})
            raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
            raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
            post('admin.usergroups.removeChannels', options)
          end
        end
      end
    end
  end
end