Manuals Notion Ruby Mapping Public API Reference NotionRubyMapping idea note
Examples â€Ŗ â€Ŗ update block sample

<aside> 💡 This page was created for testing NorionRubyMapping. I thought this page was best suited to explain the update_block API, so I am presenting it as a use case. The following column_lists are generated by the following method. I will update the block in the left column using update_block API.

block = ##### create a block #####
column_list_block = page.append_block_children ColumnListBlock.new([block, block])
left_block = column_list_block.children.first.children.first
### the following left_block udpate methods ###
left_block.save

</aside>

<aside> ℹī¸ ↑ Table of Contents

</aside>

1. BookmarkBlock

  1. url=()

    left_block.url = "<https://www.apple.com/>"
    
  2. caption.rich_text_objects=()

    left_block.caption.rich_text_objects = "Apple"
    

Apple

Google

↑ Table of Contents


2. BulletedListItemBlock

  1. color=()

    left_block.color = "orange_background"
    
  2. rich_text_array.rich_text_objects=()

    left_block.rich_text_array.rich_text_objects = "new text"
    

↑ Table of Contents


3. CalloutBlock

  1. color=()

    left_block.color = "orange_background"