<aside> 👉
Links (Block base class)
Notion Ruby Mapping Public API Reference
</aside>
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
created_time
returns the CreatedTimeProperty
object for querying database.
db.created_time
# => #<NotionRubyMapping::CreatedTimeProperty:...> # CreatedTimeProperty object
data_sources
returns an Array of DataSources.
db.data_sources
#=>
#[NotionRubyMapping::DataSource-4f93db514e1d4015b07f876e34c3b0b1,
# NotionRubyMapping::DataSource-26cd8e4e98ab81d08983000b28d9e04d]
database_title
returns a RichTextArray
object of the database’s title.
db.database_title
# => #<NotionRubyMapping::RichTextArray:0x0000000108d7d468>
description
returns a RichTextArray
object of the database’s description.
db.description
# => #<NotionRubyMapping::RichTextArray:0x0000000108bb0130>
‣