Module: Slack::Web::Api::Endpoints::UsersAdmin

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

Instance Method Summary collapse

Instance Method Details

#users_admin_invite(options = {}) ⇒ Object

Send an invitation to a new user by email (undocumented)

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :email (Object)

    Email address of the new user

  • :channels (Object)

    Comma-separated list of IDs (not names!) for channels, which the new user will auto-join. Both channel IDs for public channels and group IDs for private chanels work.

  • :first_name (Object)

    Prefilled input for the “First name” field on the “new user registration” page.

  • :last_name (Object)

    Prefilled input for the “Last name” field on the “new user registration” page.

  • :resend (Object)

    Resend the invitation email if the user has already been invited and the email was sent some time ago.

  • :restricted (Object)

    Invite a guest that can use multiple channels

  • :ultra_restricted (Object)

    Invite a guest that can use one channel only

See Also:


26
27
28
29
30
# File 'lib/slack/web/api/endpoints/users_admin.rb', line 26

def users_admin_invite(options = {})
  throw ArgumentError.new('Required arguments :email missing') if options[:email].nil?
  logger.warn('The users.admin.invite method is undocumented.')
  post('users.admin.invite', options)
end

#users_admin_setInactive(options = {}) ⇒ Object

Disable a user (undocumented)

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :user (user)

    User to disable

See Also:


38
39
40
41
42
43
# File 'lib/slack/web/api/endpoints/users_admin.rb', line 38

def users_admin_setInactive(options = {})
  throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
  logger.warn('The users.admin.setInactive method is undocumented.')
  post('users.admin.setInactive', options)
end