module Notion::Api::Endpoints::Users
Public Instance Methods
user(options = {})
click to toggle source
Retrieves a User object using the ID specified in the request.
@option options [id] :id
User to get info on.
# File lib/notion/api/endpoints/users.rb, line 12 def user(options = {}) throw ArgumentError.new('Required arguments :id missing') if options[:id].nil? get("users/#{options[:id]}") end
users_list(options = {}) { |page| ... }
click to toggle source
Returns a paginated list of User objects for the workspace.
@option options [UUID] :start_cursor 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.
# File lib/notion/api/endpoints/users.rb, line 25 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