Module: Slack::Web::Api::Endpoints::UsergroupsUsers

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

Instance Method Summary collapse

Instance Method Details

#usergroups_users_list(options = {}) ⇒ Object

List all users in a User Group

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :usergroup (string)

    The encoded ID of the User Group to update.

  • :include_disabled (boolean)

    Allow results that involve disabled User Groups.

  • :team_id (string)

    encoded team id where the user group exists, required if org token is used.

Raises:

  • (ArgumentError)

See Also:



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

def usergroups_users_list(options = {})
  raise ArgumentError, 'Required arguments :usergroup missing' if options[:usergroup].nil?
  post('usergroups.users.list', options)
end

#usergroups_users_update(options = {}) ⇒ Object

Update the list of users for a User Group

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :usergroup (string)

    The encoded ID of the User Group to update.

  • :users (array)

    A comma separated string of encoded user IDs that represent the entire list of users for the User Group.

  • :include_count (boolean)

    Include the number of users in the User Group.

  • :team_id (string)

    encoded team id where the user group exists, required if org token is used.

Raises:

  • (ArgumentError)

See Also:



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

def usergroups_users_update(options = {})
  raise ArgumentError, 'Required arguments :usergroup missing' if options[:usergroup].nil?
  raise ArgumentError, 'Required arguments :users missing' if options[:users].nil?
  post('usergroups.users.update', options)
end