<aside> 👉 Links (Block base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> ℹ️ ↑ Table of Contents
</aside>
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>"}}}}]}}]}}