Class: Notion::Children

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

Instance Method Summary collapse

Methods included from RequestClient

#delete, #get, #patch, #post

Instance Method Details

#append(block_id, body) ⇒ Object


28
29
30
31
# File 'lib/notion-sdk-ruby/resources/blocks.rb', line 28

def append(block_id, body)
  response = patch("/v1/blocks/#{block_id}/children", body.to_json)
  Block.new(response.body)
end

#list(block_id, query: {}) ⇒ Object


23
24
25
26
# File 'lib/notion-sdk-ruby/resources/blocks.rb', line 23

def list(block_id, query: {})
  response = get("/v1/blocks/#{block_id}/children", query: query)
  List.new(response.body)
end