Package-level declarations

Types

Link copied to clipboard
sealed interface Block
Link copied to clipboard
Link copied to clipboard
interface BookmarkBlock : Block
Link copied to clipboard
Link copied to clipboard
interface CalloutBlock : Block
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface CodeBlock : Block

Represents a code block in a Notion page. Code blocks are used to display formatted code snippets with syntax highlighting. They support various programming languages and can be used to share code examples or technical documentation.

Link copied to clipboard
interface DividerBlock : Block
Link copied to clipboard
interface EmbedBlock : Block
Link copied to clipboard
interface EquationBlock : Block
Link copied to clipboard
interface Heading1Block : Block
Link copied to clipboard
interface Heading2Block : Block
Link copied to clipboard
interface Heading3Block : Block
Link copied to clipboard
interface ImageBlock : Block
Link copied to clipboard
class MutableBlockList(blockList: MutableList<Block> = mutableListOf()) : List<Block>
Link copied to clipboard

Represents a numbered list item block in a Notion page. Numbered list items are part of an ordered list, where each item is automatically numbered based on its position in the list. The numbering is handled automatically by Notion.

Link copied to clipboard
Link copied to clipboard
interface QuoteBlock : Block
Link copied to clipboard
interface SyncedBlock : Block
Link copied to clipboard

Represents a table of contents block in a Notion page. A table of contents block automatically generates a hierarchical list of all headings in the page, making it easy to navigate through the content.

Link copied to clipboard
interface ToDoBlock : Block
Link copied to clipboard
interface ToggleBlock : Block

Represents a toggle block in a Notion page. Toggle blocks are collapsible sections that can contain other blocks as children. They are useful for organizing content that can be expanded or collapsed by users.

Link copied to clipboard

This type is returned when a Block of a type unknown to this library is returned by the Notion API.

Link copied to clipboard
interface VideoBlock : Block

Functions

Link copied to clipboard
fun bookmark(url: String, caption: RichTextList? = null): Block
fun bookmark(url: String, caption: String? = null, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun bulletedListItem(richTextList: RichTextList): Block
fun bulletedListItem(text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun callout(richTextList: RichTextList, icon: EmojiOrFile? = null): Block
fun callout(text: String, icon: EmojiOrFile? = null, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun code(language: String, text: RichTextList): Block
fun code(language: String, text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
Link copied to clipboard
fun divider(): Block
Link copied to clipboard
fun embed(url: String): Block
Link copied to clipboard
fun equation(expression: String): Block
Link copied to clipboard
fun heading1(richTextList: RichTextList): Block
fun heading1(text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun heading2(richTextList: RichTextList): Block
fun heading2(text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun heading3(richTextList: RichTextList): Block
fun heading3(text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun image(url: String, caption: RichTextList? = null): Block
fun image(url: String, caption: String? = null, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun numberedListItem(richTextList: RichTextList): Block
fun numberedListItem(text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun paragraph(richTextList: RichTextList): Block
fun paragraph(text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun quote(richTextList: RichTextList): Block
fun quote(text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun syncedBlock(syncedFrom: UuidString): Block
Link copied to clipboard
Link copied to clipboard
fun toDo(richTextList: RichTextList, checked: Boolean): Block
fun toDo(text: String, checked: Boolean, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun toggle(richTextList: RichTextList): Block
fun toggle(text: String, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block
Link copied to clipboard
fun video(url: String, caption: RichTextList? = null): Block
fun video(url: String, caption: String? = null, linkUrl: String? = null, annotations: RichTextAnnotations = RichTextAnnotations.DEFAULT): Block