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.
48 49 50 51 52 |
# File 'lib/slack/web/api/endpoints/users.rb', line 48 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.
67 68 69 70 71 72 73 74 75 |
# File 'lib/slack/web/api/endpoints/users.rb', line 67 def users_list( = {}) if block_given? Pagination::Cursor.new(self, :users_list, ).each do |page| yield page end else post('users.list', ) end end |
#users_setActive(options = {}) ⇒ Object
Marks a user as active.
82 83 84 |
# File 'lib/slack/web/api/endpoints/users.rb', line 82 def users_setActive( = {}) post('users.setActive', ) end |
#users_setPhoto(options = {}) ⇒ Object
Set the user profile photo
99 100 101 102 |
# File 'lib/slack/web/api/endpoints/users.rb', line 99 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.
111 112 113 114 |
# File 'lib/slack/web/api/endpoints/users.rb', line 111 def users_setPresence( = {}) throw ArgumentError.new('Required arguments :presence missing') if [:presence].nil? post('users.setPresence', ) end |