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 regular user or owner to be a workspace admin.
-
#admin_users_setExpiration(options = {}) ⇒ Object
Set an expiration for a guest user.
-
#admin_users_setOwner(options = {}) ⇒ Object
Set an existing regular user or admin 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( = {}) raise ArgumentError, 'Required arguments :team_id missing' if [:team_id].nil? raise ArgumentError, '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.
55 56 57 58 59 60 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 55 def admin_users_invite( = {}) raise ArgumentError, 'Required arguments :channel_ids missing' if [:channel_ids].nil? raise ArgumentError, 'Required arguments :email missing' if [:email].nil? raise ArgumentError, 'Required arguments :team_id missing' if [:team_id].nil? post('admin.users.invite', ) end |
#admin_users_list(options = {}) ⇒ Object
List users on a workspace
77 78 79 80 81 82 83 84 85 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 77 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.
96 97 98 99 100 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 96 def admin_users_remove( = {}) raise ArgumentError, 'Required arguments :team_id missing' if [:team_id].nil? raise ArgumentError, 'Required arguments :user_id missing' if [:user_id].nil? post('admin.users.remove', ) end |
#admin_users_setAdmin(options = {}) ⇒ Object
Set an existing regular user or owner to be a workspace admin.
111 112 113 114 115 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 111 def admin_users_setAdmin( = {}) raise ArgumentError, 'Required arguments :team_id missing' if [:team_id].nil? raise ArgumentError, '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
128 129 130 131 132 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 128 def admin_users_setExpiration( = {}) raise ArgumentError, 'Required arguments :expiration_ts missing' if [:expiration_ts].nil? raise ArgumentError, 'Required arguments :user_id missing' if [:user_id].nil? post('admin.users.setExpiration', ) end |
#admin_users_setOwner(options = {}) ⇒ Object
Set an existing regular user or admin to be a workspace owner.
143 144 145 146 147 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 143 def admin_users_setOwner( = {}) raise ArgumentError, 'Required arguments :team_id missing' if [:team_id].nil? raise ArgumentError, '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.
158 159 160 161 162 |
# File 'lib/slack/web/api/endpoints/admin_users.rb', line 158 def admin_users_setRegular( = {}) raise ArgumentError, 'Required arguments :team_id missing' if [:team_id].nil? raise ArgumentError, 'Required arguments :user_id missing' if [:user_id].nil? post('admin.users.setRegular', ) end |