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

    The encoded ID of the User Group to update.

  • :include_disabled (Object)

    Allow results that involve disabled User Groups.

  • :team_id (Object)

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

See Also:



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

def usergroups_users_list(options = {})
  throw ArgumentError.new('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 (Object)

    The encoded ID of the User Group to update.

  • :users (Object)

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

  • :include_count (Object)

    Include the number of users in the User Group.

  • :team_id (Object)

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

See Also:



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

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