<aside> đ Links (Block base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> âšī¸ â Table of Contents
</aside>
self.new
creates a LinkToPageBlock
object using a page_id
of database_id
.
b = LinkToPageBlock.new page_id: "c01166c613ae45cbb96818b4ef2f5a77"
b.block_json
# => {"type"=>"link_to_page", "object"=>"block", "link_to_page"=>{"type"=>"page_id", "page_id"=>"c01166c613ae45cbb96818b4ef2f5a77"}}
database_id
returns the database_id for LinkToPageBlock
.
b = LinkToPageBlock.new database_id: "c7697137d49f49c2bbcdd6a665c4f921"
# => {"type"=>"link_to_page", "object"=>"block", "link_to_page"=>{"type"=>"database_id", "database_id"=>"c7697137d49f49c2bbcdd6a665c4f921"}}
page_id
returns the page_id for LinkToPageBlock
.
b = LinkToPageBlock.new page_id: "c01166c613ae45cbb96818b4ef2f5a77"
# => {"type"=>"link_to_page", "object"=>"block", "link_to_page"=>{"type"=>"page_id", "page_id"=>"c01166c613ae45cbb96818b4ef2f5a77"}}