Module: Slack::Web::Api::Endpoints::AdminRoles
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/admin_roles.rb
Instance Method Summary collapse
-
#admin_roles_addAssignments(options = {}) ⇒ Object
Adds members to the specified role with the specified scopes.
-
#admin_roles_listAssignments(options = {}) ⇒ Object
Lists assignments for all roles across entities.
-
#admin_roles_removeAssignments(options = {}) ⇒ Object
Removes a set of users from a role for the given scopes and entities.
Instance Method Details
#admin_roles_addAssignments(options = {}) ⇒ Object
Adds members to the specified role with the specified scopes
20 21 22 23 24 25 |
# File 'lib/slack/web/api/endpoints/admin_roles.rb', line 20 def admin_roles_addAssignments( = {}) raise ArgumentError, 'Required arguments :entity_ids missing' if [:entity_ids].nil? raise ArgumentError, 'Required arguments :role_id missing' if [:role_id].nil? raise ArgumentError, 'Required arguments :user_ids missing' if [:user_ids].nil? post('admin.roles.addAssignments', ) end |
#admin_roles_listAssignments(options = {}) ⇒ Object
Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities
42 43 44 45 46 47 48 49 50 |
# File 'lib/slack/web/api/endpoints/admin_roles.rb', line 42 def admin_roles_listAssignments( = {}) if block_given? Pagination::Cursor.new(self, :admin_roles_listAssignments, ).each do |page| yield page end else post('admin.roles.listAssignments', ) end end |
#admin_roles_removeAssignments(options = {}) ⇒ Object
Removes a set of users from a role for the given scopes and entities
63 64 65 66 67 68 |
# File 'lib/slack/web/api/endpoints/admin_roles.rb', line 63 def admin_roles_removeAssignments( = {}) raise ArgumentError, 'Required arguments :entity_ids missing' if [:entity_ids].nil? raise ArgumentError, 'Required arguments :role_id missing' if [:role_id].nil? raise ArgumentError, 'Required arguments :user_ids missing' if [:user_ids].nil? post('admin.roles.removeAssignments', ) end |