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)

    .

Raises:

  • (ArgumentError)

See Also:



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

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

#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 (array)

    An array of channel IDs.

  • :team_id (Object)

    ID for the workspace to set the default channel for.

Raises:

  • (ArgumentError)

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 = {})
  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

#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 (string)

    The new description for the workspace.

  • :team_id (Object)

    ID for the workspace to set the description for.

Raises:

  • (ArgumentError)

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 = {})
  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

#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 (string)

    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.

Raises:

  • (ArgumentError)

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 = {})
  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

#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 (string)

    Image URL for the icon.

  • :team_id (Object)

    ID for the workspace to set the icon for.

Raises:

  • (ArgumentError)

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 = {})
  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

#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 (string)

    The new name of the workspace.

  • :team_id (Object)

    ID for the workspace to set the name for.

Raises:

  • (ArgumentError)

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 = {})
  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