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 (array)

    Comma separated string of channel IDs.

  • :usergroup_id (string)

    ID of the IDP group to add default channels for.

  • :team_id (string)

    The workspace to add default channels in.

Raises:

  • (ArgumentError)

See Also:



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

def admin_usergroups_addChannels(options = {})
  raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
  raise ArgumentError, '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 (array)

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

  • :usergroup_id (string)

    An encoded usergroup (IDP Group) ID.

  • :auto_provision (boolean)

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

Raises:

  • (ArgumentError)

See Also:



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

def admin_usergroups_addTeams(options = {})
  raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
  raise ArgumentError, '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 (boolean)

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

  • :team_id (string)

    ID of the the workspace.

Raises:

  • (ArgumentError)

See Also:



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

def admin_usergroups_listChannels(options = {})
  raise ArgumentError, '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 (array)

    Comma-separated string of channel IDs.

  • :usergroup_id (string)

    ID of the IDP Group.

Raises:

  • (ArgumentError)

See Also:



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

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