module Slack::Endpoint::Users

Public Instance Methods

users_getPresence(options={}) click to toggle source

This method lets you find out information about a user's presence. Consult the presence documentation for more details.

@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 15
def users_getPresence(options={})
  throw ArgumentError.new("Required arguments :user missing") if options[:user].nil?
  options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
  post("users.getPresence", options)
end
users_info(options={}) click to toggle source

This method returns information about a team member.

@option options [Object] :user

User to get info on

@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 29
def users_info(options={})
  throw ArgumentError.new("Required arguments :user missing") if options[:user].nil?
  options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
  post("users.info", options)
end
users_list(options={}) click to toggle source

This method returns a list of all users in the team. This includes deleted/deactivated users.

@option options [Object] :presence

Whether to include presence data in the output

@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 43
def users_list(options={})
  options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
  post("users.list", options)
end
users_setActive(options={}) click to toggle source

This method lets the slack messaging server know that the authenticated user is currently active. Consult the presence documentation for more details.

@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 56
def users_setActive(options={})
  options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
  post("users.setActive", options)
end
users_setPresence(options={}) click to toggle source

This method lets you set the calling user's manual presence. Consult the presence documentation for more details.

@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 70
def users_setPresence(options={})
  throw ArgumentError.new("Required arguments :presence missing") if options[:presence].nil?
  options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
  post("users.setPresence", options)
end