Class: Utils::Notion::DeletePageBlocks

Inherits:
Object
  • Object
show all
Defined in:
lib/bas/utils/notion/delete_page_blocks.rb

Overview

This module is a Notion utility for deleting page blocks.

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ DeletePageBlocks

Implements the delete page blocks process logic to Notion.


Params:

  • page_id Id of the notion page.

  • secret Notion secret.


returns HTTParty::Response



23
24
25
# File 'lib/bas/utils/notion/delete_page_blocks.rb', line 23

def initialize(params)
  @params = params
end

Instance Method Details

#executeObject



27
28
29
# File 'lib/bas/utils/notion/delete_page_blocks.rb', line 27

def execute
  page_blocks_ids.each { |block_id| delete_block(block_id) }
end