<aside> 👉 Links (Property base class)

ButtonProperty

CheckboxProperty

CreatedByProperty

CreatedTimeProperty

DateProperty

EmailProperty

FilesProperty

FormulaProperty

MultiSelectProperty

LastEditedByProperty

LastEditedTimeProperty

NumberProperty

PeopleProperty

PhoneNumberProperty

Property

RelationProperty

RichTextProperty

RollupProperty

SelectProperty

StatusProperty

TitleProperty

UniqueIdProperty

UrlProperty

VerificationProperty

Notion Ruby Mapping Public API Reference

</aside>

1. Instance methods

filter_greater_than(value) → Query

filter_greater_than_or_equal_to(value) → Query

filter_less_than(value) → Query

filter_less_than_or_equal_to(value) → Query

[DB/DS] format → String

  1. format of Page property raises StandardError.

  2. format of Database / DataSource property returns the number format value.

    page.properties["NumberTitle"].format
    # raises StandardError
    
    ds.properties["NumberTitle"].format
    # => "number_with_commas"
    

[DB/DS] format=(value) → String

  1. format= of Page property raises StandardError.

  2. format= of Database / DataSource property sets the number format.

    page.properties["NumberTitle"].format = "percent"
    # raises StandardError
    
    ds.properties["NumberTitle"].format = "percent"
    # => "percent"
    

number → Numeric, Hash, nil

  1. number of Page property returns the number value.

  2. number of Database / DataSource property returns the hash of the number format.

  3. For Database / DataSource property, use format to get the format value.

    page.properties["NumberTitle"].number
    # => 3.1415926535
    
    ds.properties["NumberTitle"].number
    # => {"format"=>"number_with_commas"}
    
    ds.properties["NumberTitle"].format
    # => "number_with_commas"
    

[P] number=(value) → Numeric, nil

  1. number= of Page property sets the number value.

  2. nil clears the number value.

  3. number= of Database / DataSource property raises StandardError.

    page.properties["NumberTitle"].number = 100
    # => 100
    
    page.properties["NumberTitle"].number = nil
    # => nil
    
    ds.properties["NumberTitle"].number = 100
    # raises StandardError