lib/slack/web/api/endpoints/admin_users_session.rb in slack-ruby-client-1.1.0 vs lib/slack/web/api/endpoints/admin_users_session.rb in slack-ruby-client-2.0.0
- old
+ new
@@ -12,11 +12,11 @@
# @option options [array] :user_ids
# The IDs of users you'd like to clear session settings for.
# @see https://api.slack.com/methods/admin.users.session.clearSettings
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.clearSettings.json
def admin_users_session_clearSettings(options = {})
- throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
+ raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
post('admin.users.session.clearSettings', options)
end
#
# Get user-specific session settings—the session duration and what happens when the client closes—given a list of users.
@@ -24,11 +24,11 @@
# @option options [array] :user_ids
# The IDs of users you'd like to fetch session settings for. Note: if a user does not have any active sessions, they will not be returned in the response.
# @see https://api.slack.com/methods/admin.users.session.getSettings
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.getSettings.json
def admin_users_session_getSettings(options = {})
- throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
+ raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
post('admin.users.session.getSettings', options)
end
#
# Revoke a single session for a user. The user will be forced to login to Slack.
@@ -38,12 +38,12 @@
# @option options [string] :team_id
# ID of the workspace that the session belongs to.
# @see https://api.slack.com/methods/admin.users.session.invalidate
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.invalidate.json
def admin_users_session_invalidate(options = {})
- throw ArgumentError.new('Required arguments :session_id missing') if options[:session_id].nil?
- throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
+ raise ArgumentError, 'Required arguments :session_id missing' if options[:session_id].nil?
+ raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
post('admin.users.session.invalidate', options)
end
#
# List active user sessions for an organization
@@ -78,11 +78,11 @@
# @option options [boolean] :web_only
# Only expire web sessions (default: false).
# @see https://api.slack.com/methods/admin.users.session.reset
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.reset.json
def admin_users_session_reset(options = {})
- throw ArgumentError.new('Required arguments :user_id missing') if options[:user_id].nil?
+ raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
post('admin.users.session.reset', options)
end
#
# Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users
@@ -94,26 +94,26 @@
# @option options [boolean] :web_only
# Only expire web sessions (default: false).
# @see https://api.slack.com/methods/admin.users.session.resetBulk
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.resetBulk.json
def admin_users_session_resetBulk(options = {})
- throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
+ raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
post('admin.users.session.resetBulk', options)
end
#
# Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users.
#
# @option options [array] :user_ids
- # The list of user IDs to apply the session settings for.
+ # The list of up to 1,000 user IDs to apply the session settings for.
# @option options [boolean] :desktop_app_browser_quit
# Terminate the session when the client—either the desktop app or a browser window—is closed.
# @option options [integer] :duration
# The session duration, in seconds. The minimum value is 28800, which represents 8 hours; the max value is 315569520 or 10 years (that's a long Slack session).
# @see https://api.slack.com/methods/admin.users.session.setSettings
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.setSettings.json
def admin_users_session_setSettings(options = {})
- throw ArgumentError.new('Required arguments :user_ids missing') if options[:user_ids].nil?
+ raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
post('admin.users.session.setSettings', options)
end
end
end
end