<aside> 👉 Links (Block base class)

Page

BookmarkBlock

CodeBlock

EmbedBlock

Heading2Block

LinkToPageBlock

QuoteBlock

ToDoBlock

ToggleHeading3Block

Database

BreadcrumbBlock

ColumnBlock

EquationBlock

Heading3Block

NumberedListItemBlock

SyncedBlock

ToggleBlock

VideoBlock

List

BulletedListItemBlock

ColumnListBlock

Block

CalloutBlock

DividerBlock

Heading1Block

LinkPreviewBlock

PdfBlock

TemplateBlock

ToggleHeading2Block

Notion Ruby Mapping Public API Reference

</aside>

<aside> ℹ️ ↑ Table of Contents

</aside>

1. Singleton methods

self.new(array_of_sub_blocks) → ColumnListBlock

self.new creates a ColumnListBlock object. When creating a column list block via Append block children, the column_list must have at least 2 columns, and those columns must have at least one child each.

b = ColumnListBlock.new [
  CalloutBlock.new("Emoji callout", emoji: "✅"),
  CalloutBlock.new("Url callout", file_url: "<https://img.icons8.com/ios-filled/250/000000/mac-os.png>"),
]; b.block_json
# => {"type"=>"column_list","object"=>"block","column_list"=>{"children"=>[{"type"=>"column","object"=>"block","column"=>{"children"=>[{"type"=>"callout","object"=>"block","callout"=>{"rich_text"=>[{"type"=>"text", "text"=>{"content"=>"Emoji callout", "link"=>nil}, "plain_text"=>"Emoji callout", "href"=>nil}],"color"=>"default","icon"=>{"type"=>"emoji", "emoji"=>"✅"}}}]}},{"type"=>"column","object"=>"block","column"=>{"children"=>[{"type"=>"callout","object"=>"block","callout"=>{"rich_text"=>[{"type"=>"text", "text"=>{"content"=>"Url callout", "link"=>nil}, "plain_text"=>"Url callout", "href"=>nil}],"color"=>"default","icon"=>{"type"=>"external", "external"=>{"url"=>"<https://img.icons8.com/ios-filled/250/000000/mac-os.png>"}}}}]}}]}}

↑ Table of Contents