Class: Notion::Api::UsersMethods

Inherits:
Object
  • Object
show all
Includes:
RequestClient
Defined in:
lib/notion-sdk-ruby/api/users.rb

Instance Method Summary collapse

Instance Method Details

#listNotion::List<Notion::User>

Returns a paginated list of Users for the workspace. developers.notion.com/reference/get-users



9
10
11
12
# File 'lib/notion-sdk-ruby/api/users.rb', line 9

def list
  response = get("/v1/users")
  List.new(response.body)
end

#retrieve(id) ⇒ Notion::User

Retrieves a User using the ID specified. developers.notion.com/reference/get-user

Parameters:

  • id (String)

    user_id

Returns:



18
19
20
21
# File 'lib/notion-sdk-ruby/api/users.rb', line 18

def retrieve(id)
  response = get("/v1/users/#{id}")
  User.new(response.body)
end