Class: NotionRubyMapping::Page

Inherits:
Base
  • Object
show all
Defined in:
lib/notion_ruby_mapping/page.rb

Overview

Notion page object

Instance Attribute Summary

Attributes inherited from Base

#id, #json

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #add_property_for_update, #assign_property, #children, #clear_object, create_from_json, #create_json, #icon, #initialize, #json_properties, #payload, #properties, #reload, #set_icon, #update_json

Constructor Details

This class inherits a constructor from NotionRubyMapping::Base

Class Method Details

.find(id) ⇒ Object



6
7
8
# File 'lib/notion_ruby_mapping/page.rb', line 6

def self.find(id)
  NotionCache.instance.page id
end

Instance Method Details

#reload_jsonHash



15
16
17
# File 'lib/notion_ruby_mapping/page.rb', line 15

def reload_json
  @nc.page_json @id
end

#updateObject



10
11
12
# File 'lib/notion_ruby_mapping/page.rb', line 10

def update
  update_json @nc.update_page(@id, create_json)
end