Module: Slack::Web::Api::Endpoints::Users

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/users.rb

Instance Method Summary collapse

Instance Method Details

#users_getPresence(options = {}) ⇒ Object

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

Options Hash (options):

  • :user (user)

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

See Also:


16
17
18
19
20
# File 'lib/slack/web/api/endpoints/users.rb', line 16

def users_getPresence(options = {})
  throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
  post('users.getPresence', options)
end

#users_info(options = {}) ⇒ Object

This method returns information about a team member.


29
30
31
32
33
# File 'lib/slack/web/api/endpoints/users.rb', line 29

def users_info(options = {})
  throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
  post('users.info', options)
end

#users_list(options = {}) ⇒ Object

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

Options Hash (options):

  • :presence (Object)

    Whether to include presence data in the output.

See Also:


42
43
44
# File 'lib/slack/web/api/endpoints/users.rb', line 42

def users_list(options = {})
  post('users.list', options)
end

#users_setActive(options = {}) ⇒ Object

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


53
54
55
# File 'lib/slack/web/api/endpoints/users.rb', line 53

def users_setActive(options = {})
  post('users.setActive', options)
end

#users_setPresence(options = {}) ⇒ Object

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


65
66
67
68
# File 'lib/slack/web/api/endpoints/users.rb', line 65

def users_setPresence(options = {})
  throw ArgumentError.new('Required arguments :presence missing') if options[:presence].nil?
  post('users.setPresence', options)
end