Module: Slack::Web::Api::Endpoints::AdminUsers
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/admin_users.rb
Instance Method Summary collapse
-
#admin_users_assign(options = {}) ⇒ Object
Add an Enterprise user to a workspace.
-
#admin_users_invite(options = {}) ⇒ Object
Invite a user to a workspace.
-
#admin_users_list(options = {}) ⇒ Object
List users on a workspace.
-
#admin_users_remove(options = {}) ⇒ Object
Remove a user from a workspace.
-
#admin_users_setAdmin(options = {}) ⇒ Object
Set an existing guest, regular user, or owner to be an admin user.
-
#admin_users_setExpiration(options = {}) ⇒ Object
Set an expiration for a guest user.
-
#admin_users_setOwner(options = {}) ⇒ Object
Set an existing guest, regular user, or admin user to be a workspace owner.
-
#admin_users_setRegular(options = {}) ⇒ Object
Set an existing guest user, admin user, or owner to be a regular user.
Instance Method Details
#admin_users_assign(options = {}) ⇒ Object
Add an Enterprise user to a workspace.
24 25 26 27 28 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 24 def admin_users_assign( = {}) throw ArgumentError.new('Required arguments :team_id missing') if [:team_id].nil? throw ArgumentError.new('Required arguments :user_id missing') if [:user_id].nil? post('admin.users.assign', ) end |
#admin_users_invite(options = {}) ⇒ Object
Invite a user to a workspace.
53 54 55 56 57 58 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 53 def admin_users_invite( = {}) throw ArgumentError.new('Required arguments :channel_ids missing') if [:channel_ids].nil? throw ArgumentError.new('Required arguments :email missing') if [:email].nil? throw ArgumentError.new('Required arguments :team_id missing') if [:team_id].nil? post('admin.users.invite', ) end |
#admin_users_list(options = {}) ⇒ Object
List users on a workspace
71 72 73 74 75 76 77 78 79 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 71 def admin_users_list( = {}) if block_given? Pagination::Cursor.new(self, :admin_users_list, ).each do |page| yield page end else post('admin.users.list', ) end end |
#admin_users_remove(options = {}) ⇒ Object
Remove a user from a workspace.
90 91 92 93 94 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 90 def admin_users_remove( = {}) throw ArgumentError.new('Required arguments :team_id missing') if [:team_id].nil? throw ArgumentError.new('Required arguments :user_id missing') if [:user_id].nil? post('admin.users.remove', ) end |
#admin_users_setAdmin(options = {}) ⇒ Object
Set an existing guest, regular user, or owner to be an admin user.
105 106 107 108 109 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 105 def admin_users_setAdmin( = {}) throw ArgumentError.new('Required arguments :team_id missing') if [:team_id].nil? throw ArgumentError.new('Required arguments :user_id missing') if [:user_id].nil? post('admin.users.setAdmin', ) end |
#admin_users_setExpiration(options = {}) ⇒ Object
Set an expiration for a guest user
122 123 124 125 126 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 122 def admin_users_setExpiration( = {}) throw ArgumentError.new('Required arguments :expiration_ts missing') if [:expiration_ts].nil? throw ArgumentError.new('Required arguments :user_id missing') if [:user_id].nil? post('admin.users.setExpiration', ) end |
#admin_users_setOwner(options = {}) ⇒ Object
Set an existing guest, regular user, or admin user to be a workspace owner.
137 138 139 140 141 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 137 def admin_users_setOwner( = {}) throw ArgumentError.new('Required arguments :team_id missing') if [:team_id].nil? throw ArgumentError.new('Required arguments :user_id missing') if [:user_id].nil? post('admin.users.setOwner', ) end |
#admin_users_setRegular(options = {}) ⇒ Object
Set an existing guest user, admin user, or owner to be a regular user.
152 153 154 155 156 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 152 def admin_users_setRegular( = {}) throw ArgumentError.new('Required arguments :team_id missing') if [:team_id].nil? throw ArgumentError.new('Required arguments :user_id missing') if [:user_id].nil? post('admin.users.setRegular', ) end |