slack-ruby/slack-ruby-client

View on GitHub
lib/slack/web/api/endpoints/admin_teams_settings.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 AdminTeamsSettings
          #
          # Fetch information about settings in a workspace
          #
          # @option options [Object] :team_id
          #   .
          # @see https://api.slack.com/methods/admin.teams.settings.info
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.info.json
          def admin_teams_settings_info(options = {})
            raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
            post('admin.teams.settings.info', options)
          end

          #
          # Set the default channels of a workspace.
          #
          # @option options [array] :channel_ids
          #   An array of channel IDs.
          # @option options [Object] :team_id
          #   ID for the workspace to set the default channel for.
          # @see https://api.slack.com/methods/admin.teams.settings.setDefaultChannels
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDefaultChannels.json
          def admin_teams_settings_setDefaultChannels(options = {})
            raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
            raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
            post('admin.teams.settings.setDefaultChannels', options)
          end

          #
          # Set the description of a given workspace.
          #
          # @option options [string] :description
          #   The new description for the workspace.
          # @option options [Object] :team_id
          #   ID for the workspace to set the description for.
          # @see https://api.slack.com/methods/admin.teams.settings.setDescription
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDescription.json
          def admin_teams_settings_setDescription(options = {})
            raise ArgumentError, 'Required arguments :description missing' if options[:description].nil?
            raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
            post('admin.teams.settings.setDescription', options)
          end

          #
          # An API method that allows admins to set the discoverability of a given workspace
          #
          # @option options [string] :discoverability
          #   This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted.
          # @option options [Object] :team_id
          #   The ID of the workspace to set discoverability on.
          # @see https://api.slack.com/methods/admin.teams.settings.setDiscoverability
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDiscoverability.json
          def admin_teams_settings_setDiscoverability(options = {})
            raise ArgumentError, 'Required arguments :discoverability missing' if options[:discoverability].nil?
            raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
            post('admin.teams.settings.setDiscoverability', options)
          end

          #
          # Sets the icon of a workspace.
          #
          # @option options [string] :image_url
          #   Image URL for the icon.
          # @option options [Object] :team_id
          #   ID for the workspace to set the icon for.
          # @see https://api.slack.com/methods/admin.teams.settings.setIcon
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setIcon.json
          def admin_teams_settings_setIcon(options = {})
            raise ArgumentError, 'Required arguments :image_url missing' if options[:image_url].nil?
            raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
            post('admin.teams.settings.setIcon', options)
          end

          #
          # Set the name of a given workspace.
          #
          # @option options [string] :name
          #   The new name of the workspace.
          # @option options [Object] :team_id
          #   ID for the workspace to set the name for.
          # @see https://api.slack.com/methods/admin.teams.settings.setName
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setName.json
          def admin_teams_settings_setName(options = {})
            raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
            raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
            post('admin.teams.settings.setName', options)
          end
        end
      end
    end
  end
end