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

This method returns a list of all users within 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.

See Also:



17
18
19
20
# File 'lib/slack/web/api/endpoints/usergroups_users.rb', line 17

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

This method updates the list of users that belong to a User Group. This method replaces all users in a User Group with the list of users provided in the users parameter.

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.

See Also:



33
34
35
36
37
# File 'lib/slack/web/api/endpoints/usergroups_users.rb', line 33

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