lib/slack/web/api/endpoints/admin_teams_settings.rb in slack-ruby-client-1.1.0 vs lib/slack/web/api/endpoints/admin_teams_settings.rb in slack-ruby-client-2.0.0
- old
+ new
@@ -12,11 +12,11 @@
# @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 = {})
- throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
+ 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.
@@ -26,12 +26,12 @@
# @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 = {})
- 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?
+ 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.
@@ -41,12 +41,12 @@
# @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 = {})
- throw ArgumentError.new('Required arguments :description missing') if options[:description].nil?
- throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
+ 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
@@ -56,12 +56,12 @@
# @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 = {})
- throw ArgumentError.new('Required arguments :discoverability missing') if options[:discoverability].nil?
- throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
+ 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.
@@ -71,12 +71,12 @@
# @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 = {})
- 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?
+ 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.
@@ -86,11 +86,11 @@
# @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 = {})
- throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
- throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
+ 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