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

Gets user presence information.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :user (user)

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

See Also:



16
17
18
19
# 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?
  post('users.getPresence', options)
end

#users_info(options = {}) ⇒ Object

Gets information about a user.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :user (user)

    User to get info on

See Also:



29
30
31
32
# 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?
  post('users.info', options)
end

#users_list(options = {}) ⇒ Object

Lists all users in a Slack team.



40
41
42
# File 'lib/slack/web/api/endpoints/users.rb', line 40

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

#users_setActive(options = {}) ⇒ Object

Marks a user as active.



50
51
52
# File 'lib/slack/web/api/endpoints/users.rb', line 50

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

#users_setPresence(options = {}) ⇒ Object

Manually sets user presence.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :presence (Object)

    Either ‘auto` or `away`

See Also:



62
63
64
65
# File 'lib/slack/web/api/endpoints/users.rb', line 62

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