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
This method allows the user to delete their profile image.
-
#users_getPresence(options = {}) ⇒ Object
This method lets you find out information about a user’s presence.
-
#users_identity(options = {}) ⇒ Object
After your Slack app is awarded an identity token through Sign in with Slack, use this method to retrieve a user’s identity.
-
#users_info(options = {}) ⇒ Object
This method returns information about a team member.
-
#users_list(options = {}) ⇒ Object
This method returns a list of all users in the team.
-
#users_setActive(options = {}) ⇒ Object
This method lets the slack messaging server know that the authenticated user is currently active.
-
#users_setPhoto(options = {}) ⇒ Object
This method allows the user to set their profile image.
-
#users_setPresence(options = {}) ⇒ Object
This method lets you set the calling user’s manual presence.
Instance Method Details
#users_deletePhoto(options = {}) ⇒ Object
This method allows the user to delete their profile image. It will clear whatever image is currently set.
13 14 15 |
# File 'lib/slack/web/api/endpoints/users.rb', line 13 def users_deletePhoto( = {}) post('users.deletePhoto', ) end |
#users_getPresence(options = {}) ⇒ Object
This method lets you find out information about a user’s presence. Consult the presence documentation for more details.
25 26 27 28 29 |
# File 'lib/slack/web/api/endpoints/users.rb', line 25 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
After your Slack app is awarded an identity token through Sign in with Slack, use this method to retrieve a user’s identity.
36 37 38 |
# File 'lib/slack/web/api/endpoints/users.rb', line 36 def users_identity( = {}) post('users.identity', ) end |
#users_info(options = {}) ⇒ Object
This method returns information about a team member.
47 48 49 50 51 |
# File 'lib/slack/web/api/endpoints/users.rb', line 47 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
This method returns a list of all users in the team. This includes deleted/deactivated users.
60 61 62 |
# File 'lib/slack/web/api/endpoints/users.rb', line 60 def users_list( = {}) post('users.list', ) 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.
71 72 73 |
# File 'lib/slack/web/api/endpoints/users.rb', line 71 def users_setActive( = {}) post('users.setActive', ) end |
#users_setPhoto(options = {}) ⇒ Object
This method allows the user to set their profile image. The caller can pass image data via image.
88 89 90 91 |
# File 'lib/slack/web/api/endpoints/users.rb', line 88 def users_setPhoto( = {}) throw ArgumentError.new('Required arguments :image missing') if [:image].nil? post('users.setPhoto', ) end |
#users_setPresence(options = {}) ⇒ Object
This method lets you set the calling user’s manual presence. Consult the presence documentation for more details.
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 |