Links (Block base class)
PageBookmarkBlockCodeBlockEmbedBlockHeading2BlockLinkToPageBlockQuoteBlockToDoBlockToggleHeading3Block
DatabaseBreadcrumbBlockColumnBlockEquationBlockHeading3BlockNumberedListItemBlockSyncedBlockToggleBlockVideoBlock
1. Singleton methods
self.new(text_info, sub_block: nil) → TemplateBlock (Deprecated)
- [PARAM] text_info
- a String like as “text” (String)
- an Array of Strings (Array of Strings)
- a RichTextObject (RichTextObject)
- an Array of RichTextObjects (Array of RichTextObjects)
- a RichTextArray (RichTextArray)
The following objects are used for this argument.
- [PARAM(optional)] sub_blocks
children blocks (Array of Blocks). In
append block children API
, there is a limit for nesting children as follows. So, children blocks can not have any children.
For blocks that allow children, we allow up to two levels of nesting in a single request.
- This block can have children blocks.
self.new
creates a ParagraphBlock
object using a text_info
. sub_blocks
, color
are optional parameters.2. Instance methods
append_block_children(*blocks, dry_run: false) → Array<Block>, String
- [PARAM] blocks array of blocks
- [PARAM(optional)] dry_run: true if you want to create a verification script
append_block_children
method of an existing block appends some block objects. Some blocks allow child blocks to be set up at the same time. However, due to API limitations, grandchild blocks cannot be created at once. There are many types of blocks, so check the page( Append block children sample) to see how to create blocks.append_block_children(blocks, dry_run: true)
creates a shell script using Append block children API for verification. save(dry_run: false)
- [PARAM] dry_run: true if you want to create a verification script
save
updates the Block object with update block API
. The updated object has block information generated from the JSON response.Block.find(id, dry_run: true)
creates a shell script using Retrieve a block API for verification.rich_text_array → RichTextArray
rich_text_array
returns the rich_text parameter of TemplateBlock
.