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
-
#users_deletePhoto(options = {}) ⇒ Object
Delete the user profile photo.
-
#users_getPresence(options = {}) ⇒ Object
Gets user presence information.
-
#users_identity(options = {}) ⇒ Object
Get a user’s identity.
-
#users_info(options = {}) ⇒ Object
Gets information about a user.
-
#users_list(options = {}) ⇒ Object
Lists all users in a Slack team.
-
#users_setActive(options = {}) ⇒ Object
Marks a user as active.
-
#users_setPhoto(options = {}) ⇒ Object
Set the user profile photo.
-
#users_setPresence(options = {}) ⇒ Object
Manually sets user presence.
Instance Method Details
#users_deletePhoto(options = {}) ⇒ Object
Delete the user profile photo
13 14 15 |
# File 'lib/slack/web/api/endpoints/users.rb', line 13 def users_deletePhoto( = {}) post('users.deletePhoto', ) end |
#users_getPresence(options = {}) ⇒ Object
Gets user presence information.
24 25 26 27 28 |
# File 'lib/slack/web/api/endpoints/users.rb', line 24 def users_getPresence( = {}) throw ArgumentError.new('Required arguments :user missing') if [:user].nil? = .merge(user: users_id()['user']['id']) if [:user] post('users.getPresence', ) end |
#users_identity(options = {}) ⇒ Object
Get a user’s identity.
35 36 37 |
# File 'lib/slack/web/api/endpoints/users.rb', line 35 def users_identity( = {}) post('users.identity', ) end |
#users_info(options = {}) ⇒ Object
Gets information about a user.
46 47 48 49 50 |
# File 'lib/slack/web/api/endpoints/users.rb', line 46 def users_info( = {}) throw ArgumentError.new('Required arguments :user missing') if [:user].nil? = .merge(user: users_id()['user']['id']) if [:user] post('users.info', ) end |
#users_list(options = {}) ⇒ Object
Lists all users in a Slack team.
63 64 65 |
# File 'lib/slack/web/api/endpoints/users.rb', line 63 def users_list( = {}) post('users.list', ) end |
#users_setActive(options = {}) ⇒ Object
Marks a user as active.
72 73 74 |
# File 'lib/slack/web/api/endpoints/users.rb', line 72 def users_setActive( = {}) post('users.setActive', ) end |
#users_setPhoto(options = {}) ⇒ Object
Set the user profile photo
89 90 91 92 |
# File 'lib/slack/web/api/endpoints/users.rb', line 89 def users_setPhoto( = {}) throw ArgumentError.new('Required arguments :image missing') if [:image].nil? post('users.setPhoto', ) end |
#users_setPresence(options = {}) ⇒ Object
Manually sets user presence.
101 102 103 104 |
# File 'lib/slack/web/api/endpoints/users.rb', line 101 def users_setPresence( = {}) throw ArgumentError.new('Required arguments :presence missing') if [:presence].nil? post('users.setPresence', ) end |