lib/notion/api/endpoints/pages.rb in notion-ruby-client-1.0.0 vs lib/notion/api/endpoints/pages.rb in notion-ruby-client-1.1.0

- old
+ new

@@ -58,11 +58,12 @@ # The schema for the page's keys and values is described by the properties of # the database this page belongs to. key string Name of a property as it # appears in Notion, or property ID. value object Object containing a value # specific to the property type, e.g. {"checkbox": true}. def update_page(options = {}) - throw ArgumentError.new('Required argument :page_id missing') if options[:page_id].nil? - patch("pages/#{options[:page_id]}", options.except(:page_id)) + page_id = options.delete(:page_id) + throw ArgumentError.new('Required argument :page_id missing') if page_id.nil? + patch("pages/#{page_id}", options) end # # Retrieves a `property_item` object for a given `page_id` and `property_id`. # Depending on the property type, the object returned will either be a value