Sha256: f8b0a908097f09cbe76a89851b4f22cca55384a1407f0e058204622f342d5c06

Contents?: true

Size: 1.65 KB

Versions: 4

Compression:

Stored size: 1.65 KB

Contents

# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Cli
    class App
      desc 'UsersAdmin methods.'
      command 'users_admin' do |g|
        g.desc 'Send an invitation to a new user by email (undocumented)'
        g.long_desc %( Send an invitation to a new user by email )
        g.command 'invite' do |c|
          c.flag 'email', desc: 'Email address of the new user'
          c.flag 'channels', desc: '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.'
          c.flag 'first_name', desc: 'Prefilled input for the "First name" field on the "new user registration" page.'
          c.flag 'last_name', desc: 'Prefilled input for the "Last name" field on the "new user registration" page.'
          c.flag 'resend', desc: 'Resend the invitation email if the user has already been invited and the email was sent some time ago.'
          c.flag 'restricted', desc: 'Invite a guest that can use multiple channels'
          c.flag 'ultra_restricted', desc: 'Invite a guest that can use one channel only'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.users_admin_invite(options))
          end
        end

        g.desc 'Disable a user (undocumented)'
        g.long_desc %( Disable a user )
        g.command 'setInactive' do |c|
          c.flag 'user', desc: 'User to disable'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.users_admin_setInactive(options))
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 bin/commands/users_admin.rb
slack-ruby-client-2.3.0 bin/commands/users_admin.rb
slack-ruby-client-2.2.0 bin/commands/users_admin.rb
slack-ruby-client-2.1.0 bin/commands/users_admin.rb