Sha256: 8a010207aae3140d3ecca3d0285a3f75170d5e5ba70acf2c89aab608a77702f5

Contents?: true

Size: 1.88 KB

Versions: 2

Compression:

Stored size: 1.88 KB

Contents

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

module Slack
  module Web
    module Api
      module Endpoints
        module UsersProfile
          #
          # Use this method to retrieve a user's profile information.
          #
          # @option options [user] :user
          #   User to retrieve profile info for.
          # @option options [Object] :include_labels
          #   Include labels for each ID in custom profile fields.
          # @see https://api.slack.com/methods/users.profile.get
          # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users.profile/users.profile.get.json
          def users_profile_get(options = {})
            options = options.merge(user: users_id(options)['user']['id']) if options[:user]
            post('users.profile.get', options)
          end

          #
          # Use this method to set a user's profile information, including name, email, current status, and other attributes.
          #
          # @option options [user] :user
          #   ID of user to change. This argument may only be specified by team admins on paid teams.
          # @option options [Object] :profile
          #   Collection of key:value pairs presented as a URL-encoded JSON hash.
          # @option options [Object] :name
          #   Name of a single key to set. Usable only if profile is not passed.
          # @option options [Object] :value
          #   Value to set a single key to. Usable only if profile is not passed.
          # @see https://api.slack.com/methods/users.profile.set
          # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users.profile/users.profile.set.json
          def users_profile_set(options = {})
            options = options.merge(user: users_id(options)['user']['id']) if options[:user]
            post('users.profile.set', options)
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack-ruby-client-0.9.0 lib/slack/web/api/endpoints/users_profile.rb
slack-ruby-client-0.8.1 lib/slack/web/api/endpoints/users_profile.rb