<aside> 👉

Links (Block base class)

Page

Block

CalloutBlock

DividerBlock

Heading1Block

LinkPreviewBlock

PdfBlock

TemplateBlock (Deprecated)

ToggleHeading2Block

Database

BookmarkBlock

CodeBlock

EmbedBlock

Heading2Block

LinkToPageBlock

QuoteBlock

ToDoBlock

ToggleHeading3Block

DataSource 🆕 

BreadcrumbBlock

ColumnBlock

EquationBlock

Heading3Block

NumberedListItemBlock

SyncedBlock

ToggleBlock

VideoBlock

List

BulletedListItemBlock

ColumnListBlock

FileBlock

ImageBlock

ParagraphBlock

TableOfContentsBlock

ToggleHeading1Block

Notion Ruby Mapping Public API Reference

</aside>

1. Class methods

self.find(id, dry_run: false)

Database.find(id) creates a Database object with retrieving database API. The created object has database information generated from the JSON response.

Database.find "c37a2c66-e3aa-4a0d-a447-73de3b80c253" # Notion API call
# => #<NotionRubyMapping::Database:...> # retrieved Database object

Database.find id, dry_run: true creates shell script using Retrieve a database API for verification.

print Database.find "c37a2c66-e3aa-4a0d-a447-73de3b80c253", dry_run: true
# #!/bin/sh
# curl  '<https://api.notion.com/v1/databases/c37a2c66e3aa4a0da44773de3b80c253>' \\
#   -H 'Notion-Version: 2025-09-03' \\
#   -H 'Authorization: Bearer '"$NOTION_API_KEY"''=> nil

2. Instance methods

created_time → CreatedTimeProperty

created_time returns the CreatedTimeProperty object for querying database.

db.created_time
# => #<NotionRubyMapping::CreatedTimeProperty:...> # CreatedTimeProperty object 

date_sources → Array<DataSource>

data_sources returns an Array of DataSources.

db.data_sources
#=>
#[NotionRubyMapping::DataSource-4f93db514e1d4015b07f876e34c3b0b1,
# NotionRubyMapping::DataSource-26cd8e4e98ab81d08983000b28d9e04d]

database_title → RichTextArray

database_title returns a RichTextArray object of the database’s title.

db.database_title
# => #<NotionRubyMapping::RichTextArray:0x0000000108d7d468>

description → RichTextArray

description returns a RichTextArray object of the database’s description.

db.description
# => #<NotionRubyMapping::RichTextArray:0x0000000108bb0130>

‣