Links (Block base class)
PageBookmarkBlockCodeBlockEmbedBlockHeading2BlockLinkToPageBlockQuoteBlockToDoBlockToggleHeading3Block
DatabaseBreadcrumbBlockColumnBlockEquationBlockHeading3BlockNumberedListItemBlockSyncedBlockToggleBlockVideoBlock
1. Class methods
self.new(text_info, sub_blocks: nil, color: “default”) → BulletedListItemBlock
- [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.
- [PARAM(optional)] color color string. When a_color is not specified, use “default”
- This block can have children blocks.
self.new
creates a BulletedListItemBlock
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. color → String
color
returns the color string for BulletedListItemBlock
.color=(new_color)
- [PARAM] new_color new color string
color=
updates the color parameter for BulletedListItemBlock
and sets update_block_key
of the payload object.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 BulletedListItemBlock
.