Module: Slack::Web::Api::Endpoints::AdminTeamsSettings

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/admin_teams_settings.rb

Instance Method Summary collapse

Instance Method Details

#admin_teams_settings_info(options = {}) ⇒ Object

Fetch information about settings in a workspace

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :team_id (Object)

    .

See Also:



16
17
18
19
# File 'lib/slack/web/api/endpoints/admin_teams_settings.rb', line 16

def admin_teams_settings_info(options = {})
  throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
  post('admin.teams.settings.info', options)
end

#admin_teams_settings_setDefaultChannels(options = {}) ⇒ Object

Set the default channels of a workspace.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :channel_ids (Object)

    An array of channel IDs.

  • :team_id (Object)

    ID for the workspace to set the default channel for.

See Also:



30
31
32
33
34
# File 'lib/slack/web/api/endpoints/admin_teams_settings.rb', line 30

def admin_teams_settings_setDefaultChannels(options = {})
  throw ArgumentError.new('Required arguments :channel_ids missing') if options[:channel_ids].nil?
  throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
  post('admin.teams.settings.setDefaultChannels', options)
end

#admin_teams_settings_setDescription(options = {}) ⇒ Object

Set the description of a given workspace.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :description (Object)

    The new description for the workspace.

  • :team_id (Object)

    ID for the workspace to set the description for.

See Also:



45
46
47
48
49
# File 'lib/slack/web/api/endpoints/admin_teams_settings.rb', line 45

def admin_teams_settings_setDescription(options = {})
  throw ArgumentError.new('Required arguments :description missing') if options[:description].nil?
  throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
  post('admin.teams.settings.setDescription', options)
end

#admin_teams_settings_setDiscoverability(options = {}) ⇒ Object

An API method that allows admins to set the discoverability of a given workspace

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :discoverability (Object)

    This workspace’s discovery setting. It must be set to one of open, invite_only, closed, or unlisted.

  • :team_id (Object)

    The ID of the workspace to set discoverability on.

See Also:



60
61
62
63
64
# File 'lib/slack/web/api/endpoints/admin_teams_settings.rb', line 60

def admin_teams_settings_setDiscoverability(options = {})
  throw ArgumentError.new('Required arguments :discoverability missing') if options[:discoverability].nil?
  throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
  post('admin.teams.settings.setDiscoverability', options)
end

#admin_teams_settings_setIcon(options = {}) ⇒ Object

Sets the icon of a workspace.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :image_url (Object)

    Image URL for the icon.

  • :team_id (Object)

    ID for the workspace to set the icon for.

See Also:



75
76
77
78
79
# File 'lib/slack/web/api/endpoints/admin_teams_settings.rb', line 75

def admin_teams_settings_setIcon(options = {})
  throw ArgumentError.new('Required arguments :image_url missing') if options[:image_url].nil?
  throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
  post('admin.teams.settings.setIcon', options)
end

#admin_teams_settings_setName(options = {}) ⇒ Object

Set the name of a given workspace.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :name (Object)

    The new name of the workspace.

  • :team_id (Object)

    ID for the workspace to set the name for.

See Also:



90
91
92
93
94
# File 'lib/slack/web/api/endpoints/admin_teams_settings.rb', line 90

def admin_teams_settings_setName(options = {})
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
  throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
  post('admin.teams.settings.setName', options)
end