<aside> 👉 Links (Property base class)

CheckboxProperty

DateProperty

FormulaProperty

MultiSelectProperty

PhoneNumberProperty

RollupProperty

TitleProperty

CreatedByProperty

EmailProperty

LastEditedByProperty

NumberProperty

RelationProperty

SelectProperty

UrlProperty

CreatedTimeProperty

FilesProperty

LastEditedTimeProperty

PeopleProperty

RichTextProperty

StatusProperty

Notion Ruby Mapping Public API Reference

</aside>

<aside> ℹī¸ ↑ Table of Contents

</aside>

<aside> 💡 [P] means methods for Page Property, [D] means methods for Database Property.

</aside>

1. Instance methods

files → String, Hash

  1. files of Page property returns the Array of FileObject.

  2. files of Database property returns an empty Hash {}.

    page.properties["File&MediaTitle"].files
    => [<NotionRubyMapping::FileObject:...>]
    db.properties["File&MediaTitle"].files
    => {}
    

↑ Table of Contents

[P] files=(value)

  1. file=(value) of Page property sets the email address value and set will_update_flag to true.

  2. file=(value) of Database property raises StandardError.

    page.properties["MailTitle"].email = "[email protected]"
    => "[email protected]"
    db.properties["MailTitle"].email = "[email protected]"
    # ...:in `assert_page_property': email= can execute only Page property. (StandardError)
    

↑ Table of Contents

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>

↑ Table of Contents

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>

↑ Table of Contents