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_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_setPresence(options = {}) ⇒ Object
This method lets you set the calling user’s manual presence.
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.
16 17 18 19 20 |
# File 'lib/slack/web/api/endpoints/users.rb', line 16 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.
27 28 29 |
# File 'lib/slack/web/api/endpoints/users.rb', line 27 def users_identity( = {}) post('users.identity', ) end |
#users_info(options = {}) ⇒ Object
This method returns information about a team member.
38 39 40 41 42 |
# File 'lib/slack/web/api/endpoints/users.rb', line 38 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.
51 52 53 |
# File 'lib/slack/web/api/endpoints/users.rb', line 51 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.
62 63 64 |
# File 'lib/slack/web/api/endpoints/users.rb', line 62 def users_setActive( = {}) post('users.setActive', ) end |
#users_setPresence(options = {}) ⇒ Object
This method lets you set the calling user’s manual presence. Consult the presence documentation for more details.
74 75 76 77 |
# File 'lib/slack/web/api/endpoints/users.rb', line 74 def users_setPresence( = {}) throw ArgumentError.new('Required arguments :presence missing') if [:presence].nil? post('users.setPresence', ) end |