module Slack::Endpoint::Usergroups
Public Instance Methods
Create a User Group
@option options [Object] :name
A name for the User Group. Must be unique among User Groups.
@option options [Object] :channels
A comma separated string of encoded channel IDs for which the User Group uses as a default.
@option options [Object] :description
A short description of the User Group.
@option options [Object] :handle
A mention handle. Must be unique among channels, users and User Groups.
@option options [Object] :include_count
Include the number of users in each User Group.
@see api.slack.com/methods/usergroups.create @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.create.md @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.create.json
# File lib/slack/endpoint/usergroups.rb, line 22 def usergroups_create(options={}) throw ArgumentError.new("Required arguments :name missing") if options[:name].nil? post("usergroups.create", options) end
Disable an existing User Group
@option options [Object] :usergroup
The encoded ID of the User Group to disable.
@option options [Object] :include_count
Include the number of users in the User Group.
@see api.slack.com/methods/usergroups.disable @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.disable.md @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.disable.json
# File lib/slack/endpoint/usergroups.rb, line 37 def usergroups_disable(options={}) throw ArgumentError.new("Required arguments :usergroup missing") if options[:usergroup].nil? post("usergroups.disable", options) end
Enable a User Group
@option options [Object] :usergroup
The encoded ID of the User Group to enable.
@option options [Object] :include_count
Include the number of users in the User Group.
@see api.slack.com/methods/usergroups.enable @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.enable.md @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.enable.json
# File lib/slack/endpoint/usergroups.rb, line 52 def usergroups_enable(options={}) throw ArgumentError.new("Required arguments :usergroup missing") if options[:usergroup].nil? post("usergroups.enable", options) end
List all User Groups
for a team
@option options [Object] :include_count
Include the number of users in each User Group.
@option options [Object] :include_disabled
Include disabled User Groups.
@option options [Object] :include_users
Include the list of users for each User Group.
@see api.slack.com/methods/usergroups.list @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.list.md @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.list.json
# File lib/slack/endpoint/usergroups.rb, line 69 def usergroups_list(options={}) post("usergroups.list", options) end
Update an existing User Group
@option options [Object] :usergroup
The encoded ID of the User Group to update.
@option options [Object] :channels
A comma separated string of encoded channel IDs for which the User Group uses as a default.
@option options [Object] :description
A short description of the User Group.
@option options [Object] :handle
A mention handle. Must be unique among channels, users and User Groups.
@option options [Object] :include_count
Include the number of users in the User Group.
@option options [Object] :name
A name for the User Group. Must be unique among User Groups.
@see api.slack.com/methods/usergroups.update @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.update.md @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.update.json
# File lib/slack/endpoint/usergroups.rb, line 91 def usergroups_update(options={}) throw ArgumentError.new("Required arguments :usergroup missing") if options[:usergroup].nil? post("usergroups.update", options) end
List all users in a User Group
@option options [Object] :usergroup
The encoded ID of the User Group to update.
@option options [Object] :include_disabled
Allow results that involve disabled User Groups.
@see api.slack.com/methods/usergroups.users.list @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.users.list.md @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.users.list.json
# File lib/slack/endpoint/usergroups.rb, line 106 def usergroups_users_list(options={}) throw ArgumentError.new("Required arguments :usergroup missing") if options[:usergroup].nil? post("usergroups.users.list", options) end
Update the list of users for a User Group
@option options [Object] :usergroup
The encoded ID of the User Group to update.
@option options [Object] :users
A comma separated string of encoded user IDs that represent the entire list of users for the User Group.
@option options [Object] :include_count
Include the number of users in the User Group.
@see api.slack.com/methods/usergroups.users.update @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.users.update.md @see github.com/aki017/slack-api-docs/blob/master/methods/usergroups.users.update.json
# File lib/slack/endpoint/usergroups.rb, line 123 def usergroups_users_update(options={}) throw ArgumentError.new("Required arguments :usergroup missing") if options[:usergroup].nil? throw ArgumentError.new("Required arguments :users missing") if options[:users].nil? post("usergroups.users.update", options) end