<aside> 👉

Links (Block base class)

Page

AudioBlock

Block

CodeBlock

EmbedBlock

Heading2Block

LinkPreviewBlock

PdfBlock

TableOfContentsBlock

ToggleHeading1Block

VideoBlock

Database

BookmarkBlock

CalloutBlock

ColumnBlock

EquationBlock

Heading3Block

LinkToPageBlock

QuoteBlock

TableRowBlock

ToggleHeading2Block

DataSource 🆕

BreadcrumbBlock

ChildDatabaseBlock

ColumnListBlock

FileBlock

Heading4Block

NumberedListItemBlock

SyncedBlock

ToDoBlock

ToggleHeading3Block

List

BulletedListItemBlock

ChildPageBlock

DividerBlock

Heading1Block

ImageBlock

ParagraphBlock

TableBlock

ToggleBlock

ToggleHeading4Block

Notion Ruby Mapping Public API Reference

</aside>

<aside> ⚠️

LinkPreviewBlock is read-only. The Notion API can return link_preview blocks, but does not support creating or appending them. NotionRubyMapping does not provide URL updates for this block type. Retrieve an existing Link Preview through Block.find or a block-children response.

</aside>

1. Instance methods

url → String

$\fbox{implemented in UrlBaseBlock}$

url returns the original URL stored in the Link Preview returned by the Notion API.

block = Block.find "link_preview_block_id"
block.url
# => "<https://github.com/example/example-repo/pull/1234>"

can_append → false

$\fbox{implemented in Block}$

can_append returns false because the Notion API does not support creating or appending link_preview blocks.

block = Block.find "link_preview_block_id"
block.can_append
# => false