Method: Notion::Api::Endpoints::Users#users_list

Defined in:
lib/notion/api/endpoints/users.rb

#users_list(options = {}) ⇒ Object

Returns a paginated list of User objects for the workspace.

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

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :start_cursor (UUID)
  • :page_size (integer)

    The number of items from the full list desired in the response. Maximum: 100



36
37
38
39
40
41
42
43
44
# File 'lib/notion/api/endpoints/users.rb', line 36

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