Method: Slack::Web::Api::Endpoints::Users#users_list

Defined in:
lib/slack/web/api/endpoints/users.rb

#users_list(options = {}) ⇒ Object

Lists all users in a Slack team.

Options Hash (options):

  • :cursor (Object)

    Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request’s response_metadata. Default value fetches the first “page” of the collection. See pagination for more detail.

  • :include_locale (Object)

    Set this to true to receive the locale for users. Defaults to false.

  • :limit (Object)

    The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn’t been reached.

  • :presence (Object)

    Deprecated. Whether to include presence data in the output. Defaults to false. Setting this to true reduces performance, especially with large teams.

See Also:



93
94
95
96
97
98
99
100
101
# File 'lib/slack/web/api/endpoints/users.rb', line 93

def users_list(options = {})
  if block_given?
    Pagination::Cursor.new(self, :users_list, options).each do |page|
      yield page
    end
  else
    post('users.list', options)
  end
end