Class: NotionRubyMapping::Database
- Inherits:
-
Base
- Object
- Base
- NotionRubyMapping::Database
show all
- Defined in:
- lib/notion_ruby_mapping/database.rb
Overview
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
Class Method Details
.find(id) ⇒ Object
6
7
8
|
# File 'lib/notion_ruby_mapping/database.rb', line 6
def self.find(id)
NotionCache.instance.database id
end
|
.query(id, query = nil) ⇒ Object
12
13
14
15
|
# File 'lib/notion_ruby_mapping/database.rb', line 12
def self.query(id, query = nil)
query ||= Query.new
NotionCache.instance.database_query(id, query)
end
|
Instance Method Details
#reload_json ⇒ Hash
24
25
26
|
# File 'lib/notion_ruby_mapping/database.rb', line 24
def reload_json
@nc.database_json @id
end
|
#update ⇒ Object
19
20
21
|
# File 'lib/notion_ruby_mapping/database.rb', line 19
def update
update_json @nc.update_database(@id, create_json)
end
|