Method: Utils::CollectionViewComponents.add_new_row

Defined in:
lib/notion_api/utils.rb

.add_new_row(new_block_id) ⇒ Object



586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
# File 'lib/notion_api/utils.rb', line 586

def self.add_new_row(new_block_id)
  # ! payload for adding a new row to the table.
  # ! new_block_id -> the ID of the new row : ``str``
  table = "block"
  path = []
  command = "set"
  type = "page"

  {
    id: new_block_id,
    table: table,
    path: path,
    command: command,
    args: {
      type: type,
      id: new_block_id,
      version: 1,
    },
  }
end