Module: Slack::Web::Api::Endpoints::Usergroups
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/usergroups.rb
Instance Method Summary collapse
-
#usergroups_create(options = {}) ⇒ Object
This method is used to create a user group.
-
#usergroups_disable(options = {}) ⇒ Object
This method disables an existing user group.
-
#usergroups_enable(options = {}) ⇒ Object
This method enables a user group which was previously disabled.
-
#usergroups_list(options = {}) ⇒ Object
This method returns a list of all user groups in the team.
-
#usergroups_update(options = {}) ⇒ Object
This method updates the properties of an existing user group.
-
#usergroups_users(options = {}) ⇒ Object
This method updates the list of users that belong to a user group.
Instance Method Details
#usergroups_create(options = {}) ⇒ Object
This method is used to create a user group.
23 24 25 26 |
# File 'lib/slack/web/api/endpoints/usergroups.rb', line 23 def usergroups_create( = {}) throw ArgumentError.new('Required arguments :name missing') if [:name].nil? post('usergroups.create', ) end |
#usergroups_disable(options = {}) ⇒ Object
This method disables an existing user group.
37 38 39 40 |
# File 'lib/slack/web/api/endpoints/usergroups.rb', line 37 def usergroups_disable( = {}) throw ArgumentError.new('Required arguments :usergroup missing') if [:usergroup].nil? post('usergroups.disable', ) end |
#usergroups_enable(options = {}) ⇒ Object
This method enables a user group which was previously disabled.
51 52 53 54 |
# File 'lib/slack/web/api/endpoints/usergroups.rb', line 51 def usergroups_enable( = {}) throw ArgumentError.new('Required arguments :usergroup missing') if [:usergroup].nil? post('usergroups.enable', ) end |
#usergroups_list(options = {}) ⇒ Object
This method returns a list of all user groups in the team. This can optionally include disabled user groups.
67 68 69 |
# File 'lib/slack/web/api/endpoints/usergroups.rb', line 67 def usergroups_list( = {}) post('usergroups.list', ) end |
#usergroups_update(options = {}) ⇒ Object
This method updates the properties of an existing user group.
88 89 90 91 |
# File 'lib/slack/web/api/endpoints/usergroups.rb', line 88 def usergroups_update( = {}) throw ArgumentError.new('Required arguments :usergroup missing') if [:usergroup].nil? post('usergroups.update', ) end |
#usergroups_users(options = {}) ⇒ Object
This method updates the list of users that belong to a user group. This method replaces all users in a user group with the list of users provided in the users parameter.
104 105 106 107 108 |
# File 'lib/slack/web/api/endpoints/usergroups.rb', line 104 def usergroups_users( = {}) throw ArgumentError.new('Required arguments :usergroup missing') if [:usergroup].nil? throw ArgumentError.new('Required arguments :users missing') if [:users].nil? post('usergroups.users', ) end |