<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 usage

These methods return a Query; .filter in the examples reads its generated Hash. Creating a condition does not send an API request or update the property value.

The positional argument is a number. Omit condition: and another_type: for an ordinary number filter; they are for nested Formula / Rollup conditions.

[DB/DS] filter_greater_than(value) → Query

Creates a Query object whose number condition matches a value greater than the given number.

ds.properties["NumberTitle"].filter_greater_than(100).filter
# => {"property" => "NumberTitle", "number" => {"greater_than" => 100}}

[DB/DS] filter_greater_than_or_equal_to(value) → Query

Creates a Query object whose number condition matches a value greater than or equal to the given number.

ds.properties["NumberTitle"].filter_greater_than_or_equal_to(100).filter
# => {"property" => "NumberTitle", "number" => {"greater_than_or_equal_to" => 100}}

[DB/DS] filter_less_than(value) → Query

Creates a Query object whose number condition matches a value less than the given number.

ds.properties["NumberTitle"].filter_less_than(100).filter
# => {"property" => "NumberTitle", "number" => {"less_than" => 100}}

[DB/DS] filter_less_than_or_equal_to(value) → Query

Creates a Query object whose number condition matches a value less than or equal to the given number.

ds.properties["NumberTitle"].filter_less_than_or_equal_to(100).filter
# => {"property" => "NumberTitle", "number" => {"less_than_or_equal_to" => 100}}

[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"