Module: Slack::Web::Api::Endpoints::AdminUsergroups

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/admin_usergroups.rb

Instance Method Summary collapse

Instance Method Details

#admin_usergroups_addChannels(options = {}) ⇒ Object

Add up to one hundred default channels to an IDP group.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :channel_ids (Object)

    Comma separated string of channel IDs.

  • :usergroup_id (Object)

    ID of the IDP group to add default channels for.

  • :team_id (Object)

    The workspace to add default channels in.

See Also:



20
21
22
23
24
# File 'lib/slack/web/api/endpoints/admin_usergroups.rb', line 20

def admin_usergroups_addChannels(options = {})
  throw ArgumentError.new('Required arguments :channel_ids missing') if options[:channel_ids].nil?
  throw ArgumentError.new('Required arguments :usergroup_id missing') if options[:usergroup_id].nil?
  post('admin.usergroups.addChannels', options)
end

#admin_usergroups_addTeams(options = {}) ⇒ Object

Associate one or more default workspaces with an organization-wide IDP group.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :team_ids (Object)

    A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.

  • :usergroup_id (Object)

    An encoded usergroup (IDP Group) ID.

  • :auto_provision (Object)

    When true, this method automatically creates new workspace accounts for the IDP group members.

See Also:



37
38
39
40
41
# File 'lib/slack/web/api/endpoints/admin_usergroups.rb', line 37

def admin_usergroups_addTeams(options = {})
  throw ArgumentError.new('Required arguments :team_ids missing') if options[:team_ids].nil?
  throw ArgumentError.new('Required arguments :usergroup_id missing') if options[:usergroup_id].nil?
  post('admin.usergroups.addTeams', options)
end

#admin_usergroups_listChannels(options = {}) ⇒ Object

List the channels linked to an org-level IDP group (user group).

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :usergroup_id (Object)

    ID of the IDP group to list default channels for.

  • :include_num_members (Object)

    Flag to include or exclude the count of members per channel.

  • :team_id (Object)

    ID of the the workspace.

See Also:



54
55
56
57
# File 'lib/slack/web/api/endpoints/admin_usergroups.rb', line 54

def admin_usergroups_listChannels(options = {})
  throw ArgumentError.new('Required arguments :usergroup_id missing') if options[:usergroup_id].nil?
  post('admin.usergroups.listChannels', options)
end

#admin_usergroups_removeChannels(options = {}) ⇒ Object

Remove one or more default channels from an org-level IDP group (user group).

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :channel_ids (Object)

    Comma-separated string of channel IDs.

  • :usergroup_id (Object)

    ID of the IDP Group.

See Also:



68
69
70
71
72
# File 'lib/slack/web/api/endpoints/admin_usergroups.rb', line 68

def admin_usergroups_removeChannels(options = {})
  throw ArgumentError.new('Required arguments :channel_ids missing') if options[:channel_ids].nil?
  throw ArgumentError.new('Required arguments :usergroup_id missing') if options[:usergroup_id].nil?
  post('admin.usergroups.removeChannels', options)
end