module Slack::Endpoint::Users

Public Instance Methods

users_deletePhoto(options={}) click to toggle source

Delete the user profile photo

@see api.slack.com/methods/users.deletePhoto @see github.com/aki017/slack-api-docs/blob/master/methods/users.deletePhoto.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.deletePhoto.json

# File lib/slack/endpoint/users.rb, line 12
def users_deletePhoto(options={})
  post("users.deletePhoto", options)
end
users_getPresence(options={}) click to toggle source

Gets user presence information.

@option options [Object] :user

User to get presence info on. Defaults to the authed user.

@see api.slack.com/methods/users.getPresence @see github.com/aki017/slack-api-docs/blob/master/methods/users.getPresence.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.getPresence.json

# File lib/slack/endpoint/users.rb, line 24
def users_getPresence(options={})
  throw ArgumentError.new("Required arguments :user missing") if options[:user].nil?
  post("users.getPresence", options)
end
users_identity(options={}) click to toggle source

Get a user's identity.

@see api.slack.com/methods/users.identity @see github.com/aki017/slack-api-docs/blob/master/methods/users.identity.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.identity.json

# File lib/slack/endpoint/users.rb, line 35
def users_identity(options={})
  post("users.identity", options)
end
users_info(options={}) click to toggle source

Gets information about a user.

@option options [Object] :user

User to get info on

@option options [Object] :include_locale

Set this to true to receive the locale for this user. Defaults to false

@see api.slack.com/methods/users.info @see github.com/aki017/slack-api-docs/blob/master/methods/users.info.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.info.json

# File lib/slack/endpoint/users.rb, line 49
def users_info(options={})
  throw ArgumentError.new("Required arguments :user missing") if options[:user].nil?
  post("users.info", options)
end
users_list(options={}) click to toggle source

Lists all users in a Slack team.

@option options [Object] :cursor

Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.

@option options [Object] :include_locale

Set this to true to receive the locale for users. Defaults to false

@option options [Object] :limit

The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.

@option options [Object] :presence

Whether to include presence data in the output. Defaults to false. Setting this to true reduces performance, especially with large teams.

@see api.slack.com/methods/users.list @see github.com/aki017/slack-api-docs/blob/master/methods/users.list.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.list.json

# File lib/slack/endpoint/users.rb, line 68
def users_list(options={})
  post("users.list", options)
end
users_lookupByEmail(options={}) click to toggle source

Find a user with an email address.

@option options [Object] :email

An email address belonging to a user in the workspace

@see api.slack.com/methods/users.lookupByEmail @see github.com/aki017/slack-api-docs/blob/master/methods/users.lookupByEmail.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.lookupByEmail.json

# File lib/slack/endpoint/users.rb, line 80
def users_lookupByEmail(options={})
  throw ArgumentError.new("Required arguments :email missing") if options[:email].nil?
  post("users.lookupByEmail", options)
end
users_profile_get(options={}) click to toggle source

Retrieves a user's profile information.

@option options [Object] :include_labels

Include labels for each ID in custom profile fields

@option options [Object] :user

User to retrieve profile info for

@see api.slack.com/methods/users.profile.get @see github.com/aki017/slack-api-docs/blob/master/methods/users.profile.get.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.profile.get.json

# File lib/slack/endpoint/users.rb, line 95
def users_profile_get(options={})
  post("users.profile.get", options)
end
users_profile_set(options={}) click to toggle source

Set the profile information for a user.

@option options [Object] :name

Name of a single key to set. Usable only if profile is not passed.

@option options [Object] :profile

Collection of key:value pairs presented as a URL-encoded JSON hash.

@option options [Object] :user

ID of user to change. This argument may only be specified by team admins on paid teams.

@option options [Object] :value

Value to set a single key to. Usable only if profile is not passed.

@see api.slack.com/methods/users.profile.set @see github.com/aki017/slack-api-docs/blob/master/methods/users.profile.set.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.profile.set.json

# File lib/slack/endpoint/users.rb, line 113
def users_profile_set(options={})
  post("users.profile.set", options)
end
users_setActive(options={}) click to toggle source

Marks a user as active.

@see api.slack.com/methods/users.setActive @see github.com/aki017/slack-api-docs/blob/master/methods/users.setActive.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.setActive.json

# File lib/slack/endpoint/users.rb, line 123
def users_setActive(options={})
  post("users.setActive", options)
end
users_setPhoto(options={}) click to toggle source

Set the user profile photo

@option options [Object] :image

File contents via multipart/form-data.

@option options [Object] :crop_w

Width/height of crop box (always square)

@option options [Object] :crop_x

X coordinate of top-left corner of crop box

@option options [Object] :crop_y

Y coordinate of top-left corner of crop box

@see api.slack.com/methods/users.setPhoto @see github.com/aki017/slack-api-docs/blob/master/methods/users.setPhoto.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.setPhoto.json

# File lib/slack/endpoint/users.rb, line 141
def users_setPhoto(options={})
  throw ArgumentError.new("Required arguments :image missing") if options[:image].nil?
  post("users.setPhoto", options)
end
users_setPresence(options={}) click to toggle source

Manually sets user presence.

@option options [Object] :presence

Either auto or away

@see api.slack.com/methods/users.setPresence @see github.com/aki017/slack-api-docs/blob/master/methods/users.setPresence.md @see github.com/aki017/slack-api-docs/blob/master/methods/users.setPresence.json

# File lib/slack/endpoint/users.rb, line 154
def users_setPresence(options={})
  throw ArgumentError.new("Required arguments :presence missing") if options[:presence].nil?
  post("users.setPresence", options)
end