[P] means methods for Page Property, [D] means methods for Database Property.
1. Instance methods
files → String, Hash
files
of Page property returns the Array of FileObject.
files
of Database property returns an empty Hash {}.
page.properties["File&MediaTitle"].files => [<NotionRubyMapping::FileObject:...>] db.properties["File&MediaTitle"].files => {}
[P] files=(value or values)
- [PARAM] value new email address value
file=(value or values)
of Page property sets the url values or FileUploadObject objects and set will_update_flag to true. It can accept not only a single URL string or FileUploadObject, but also an array containing them.
file=(value or values)
of Database property raises StandardError.
page.properties["File&MediaTitle"].files = "image url" => "image url" page.properties["File&MediaTitle"].files [#<NotionRubyMapping::FileObject:XXXXXXXXXXXXXXXXX @type="external", @url="image url", @will_update=false>] fuo = FileUploadObject fname: "test.png" page.properties["File&MediaTitle"].files = ["image url", fuo] => ["image url", fuo] page.properties["File&MediaTitle"].files [#<NotionRubyMapping::FileObject:YYYYYYYYYYYYY @type="external", @url="image url", @will_update=false>, #<NotionRubyMapping::FileObject:ZZZZZZZZZZZZZ @type="file_upload_object", @file_upload_object=#<NotionRubyMapping;:FileUploadObject:AAAAAAAAAAAAAAAA, @will_update=false>] db.properties["MailTitle"].email = "hkob@example.com" # ...:in `assert_page_property': email= can execute only Page property. (StandardError)
filter_is_empty → Query
filter_is_empty
creates a Query object for is_empty
filter.db.properties["CreatedByTitle"].filter_is_empty => #<NotionRubyMapping::Query:0x0000000106af9ef0 @filter={"property"=>"CreatedByTitle", "created_by"=>{"is_empty"=>true}}, @page_size=100, @sort=[], @start_cursor=nil>
filter_is_not_empty → Query
filter_is_not_empty
creates a Query object for is_not_empty
filter.db.properties["CreatedByTitle"].filter_is_not_empty => #<NotionRubyMapping::Query:0x00000001104b7290 @filter={"property"=>"CreatedByTitle", "created_by"=>{"is_not_empty"=>true}}, @page_size=100, @sort=[], @start_cursor=nil>