Class: Notion::Api::UsersMethods
- Inherits:
-
Object
- Object
- Notion::Api::UsersMethods
- Includes:
- RequestClient
- Defined in:
- lib/notion-sdk-ruby/api/users.rb
Instance Method Summary collapse
-
#list ⇒ Notion::List<Notion::User>
Returns a paginated list of Users for the workspace.
-
#retrieve(id) ⇒ Notion::User
Retrieves a User using the ID specified.
Instance Method Details
#list ⇒ Notion::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
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 |