Sha256: 19aca020779dbb021dc85d4777fe86e5f142a22805a1d734bf48541088fd0470

Contents?: true

Size: 1.63 KB

Versions: 4

Compression:

Stored size: 1.63 KB

Contents

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

module Slack
  module Cli
    class App
      desc 'UsersProfile methods.'
      command 'users_profile' do |g|
        g.desc "Retrieve a user's profile information, including their custom status."
        g.long_desc %( Retrieve a user's profile information, including their custom status. )
        g.command 'get' do |c|
          c.flag 'include_labels', desc: 'Include labels for each ID in custom profile fields. Using this parameter will heavily rate-limit your requests and is not recommended.'
          c.flag 'user', desc: 'User to retrieve profile info for.'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.users_profile_get(options))
          end
        end

        g.desc "Set a user's profile information, including custom status."
        g.long_desc %( Set a user's profile information, including custom status. )
        g.command 'set' do |c|
          c.flag 'name', desc: 'Name of a single key to set. Usable only if profile is not passed.'
          c.flag 'profile', desc: 'Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.'
          c.flag 'user', desc: 'ID of user to change. This argument may only be specified by admins on paid teams.'
          c.flag 'value', desc: 'Value to set a single key to. Usable only if profile is not passed.'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.users_profile_set(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_profile.rb
slack-ruby-client-2.3.0 bin/commands/users_profile.rb
slack-ruby-client-2.2.0 bin/commands/users_profile.rb
slack-ruby-client-2.1.0 bin/commands/users_profile.rb