Module: Slack::Endpoint::Usergroups
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/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_list(options = {}) ⇒ Object
This method returns a list of all users within a User Group.
-
#usergroups_users_update(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.
22 23 24 25 |
# File 'lib/slack/endpoint/usergroups.rb', line 22 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/endpoint/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.
52 53 54 55 |
# File 'lib/slack/endpoint/usergroups.rb', line 52 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.
69 70 71 |
# File 'lib/slack/endpoint/usergroups.rb', line 69 def usergroups_list(={}) post("usergroups.list", ) end |
#usergroups_update(options = {}) ⇒ Object
This method updates the properties of an existing User Group.
91 92 93 94 |
# File 'lib/slack/endpoint/usergroups.rb', line 91 def usergroups_update(={}) throw ArgumentError.new("Required arguments :usergroup missing") if [:usergroup].nil? post("usergroups.update", ) end |
#usergroups_users_list(options = {}) ⇒ Object
This method returns a list of all users within a User Group.
106 107 108 109 |
# File 'lib/slack/endpoint/usergroups.rb', line 106 def usergroups_users_list(={}) throw ArgumentError.new("Required arguments :usergroup missing") if [:usergroup].nil? post("usergroups.users.list", ) end |
#usergroups_users_update(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.
123 124 125 126 127 |
# File 'lib/slack/endpoint/usergroups.rb', line 123 def usergroups_users_update(={}) throw ArgumentError.new("Required arguments :usergroup missing") if [:usergroup].nil? throw ArgumentError.new("Required arguments :users missing") if [:users].nil? post("usergroups.users.update", ) end |