class NotionRb::Api::Restore
Public Class Methods
new(params)
click to toggle source
Calls superclass method
NotionRb::Api::Base::new
# File lib/notion_rb/api/restore.rb, line 6 def initialize(params) super @parent_id = params[:parent_id] end
Private Instance Methods
params()
click to toggle source
# File lib/notion_rb/api/restore.rb, line 19 def params { requestId: SecureRandom.uuid, transactions: [{ id: SecureRandom.uuid, operations: [{ id: @notion_id, table: 'block', path: [], command: 'update', args: { parent_id: @parent_id, parent_table: 'block', alive: true } }, { id: @parent_id, table: 'block', path: ['content'], command: 'listAfter', args: { id: @notion_id } }] }] } end
url()
click to toggle source
# File lib/notion_rb/api/restore.rb, line 15 def url 'submitTransaction' end