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

1. Instance methods

last_edited_time → String, Hash

  1. last_edited_time of Page property generated from properties[] returns the last edited time by iso8601 date format.

  2. last_edited_time of Database property generated from properties[] returns an empty Hash {}.

  3. last_edited_time of Page and Database properties generated from created_time returns the last edited time by iso8601 date format.

    page.properties["LastEditedTimeTitle"].last_edited_time
    # => "2022-03-14T01:55:00.000Z"
    db.properties["LastEditedTimeTitle"].last_edited_time
    # => {}
    page.last_edited_time.last_edited_time
    # => "2022-03-14T01:55:00.000Z"
    db.last_edited_time.last_edited_time
    # => "2022-03-23T10:43:00.000Z"
    

↑ Table of Contents

filter_before(value) → Query

filter_before creates a Query object for before filter.

db.created_time.filter_before Time.new(2022, 5, 4, 21, 30)
# => #<NotionRubyMapping::Query:0x0000000110675cf8 @filter={"timestamp"=>"created_time", "created_time"=>{"before"=>"2022-05-04T21:30:00+09:00"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (date)
db.properties["RollupTitle"].filter_before Date.new(2022, 5, 7), another_type: "date"
# => #<NotionRubyMapping::Query:0x00000001055804e8 @filter={"property"=>"RollupTitle", "date"=>{"before"=>"2022-05-07"}}, @page_size=100, @sort=[], @start_cursor=nil>

↑ Table of Contents

filter_does_not_equal(value) → Query

filter_does_not_equal creates a Query object for does_not_equal filter.

db.properties["CheckboxTitle"].filter_does_not_equal true
# => #<NotionRubyMapping::Query:0x0000000110487680 @filter={"property"=>"CheckboxTitle", "checkbox"=>{"does_not_equal"=>true}}, @page_size=100, @sort=[], @start_cursor=nil>

db.created_time.filter_does_not_equal Date.new(2022, 5, 4)
# => #<NotionRubyMapping::Query:0x000000011052c928 @filter={"timestamp"=>"created_time", "created_time"=>{"does_not_equal"=>"2022-05-04"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (none, any, every)
db.properties["RollupTitle"].filter_does_not_equal "abc", condition: "every", another_type: "phone_number"
# => #<NotionRubyMapping::Query:0x00000001090d5430 @filter={"property"=>"RollupTitle", "every"=>{"phone_number"=>{"does_not_equal"=>"abc"}}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (date)
db.properties["RollupTitle"].filter_does_not_equal Date.new(2022, 5, 7), another_type: "date"
# => #<NotionRubyMapping::Query:0x00000001090ff668 @filter={"property"=>"RollupTitle", "date"=>{"does_not_equal"=>"2022-05-07"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (number)
db.properties["RollupTitle"].filter_does_not_equal 100, another_type: "number"
# => #<NotionRubyMapping::Query:0x00000001090dc7f8 @filter={"property"=>"RollupTitle", "number"=>{"does_not_equal"=>100}}, @page_size=100, @sort=[], @start_cursor=nil>

↑ Table of Contents

filter_equals(value) → Query

filter_equals creates a Query object for equals filter.

db.properties["CheckboxTitle"].filter_equals true
# => #<NotionRubyMapping::Query:0x00000001105279f0 @filter={"property"=>"CheckboxTitle", "checkbox"=>{"equals"=>true}}, @page_size=100, @sort=[], @start_cursor=nil>

db.created_time.filter_equals Date.new(2022, 5, 4)
# => #<NotionRubyMapping::Query:0x000000011046dd20 @filter={"timestamp"=>"created_time", "created_time"=>{"equals"=>"2022-05-04"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (none, any, every)
db.properties["RollupTitle"].filter_equals "abc", condition: "every", another_type: "phone_number"
# => #<NotionRubyMapping::Query:0x0000000109033928 @filter={"property"=>"RollupTitle", "every"=>{"phone_number"=>{"equals"=>"abc"}}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (date)
db.properties["RollupTitle"].filter_equals Date.new(2022, 5, 7), another_type: "date"
# => #<NotionRubyMapping::Query:0x000000010925b480 @filter={"property"=>"RollupTitle", "date"=>{"equals"=>"2022-05-07"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (number)
db.properties["RollupTitle"].filter_equals 100, another_type: "number"
# => #<NotionRubyMapping::Query:0x0000000108f5f0b0 @filter={"property"=>"RollupTitle", "number"=>{"equals"=>100}}, @page_size=100, @sort=[], @start_cursor=nil>

↑ Table of Contents

filter_on_or_after(value) → Query

filter_on_or_after creates a Query object for on_or_after filter.

db.created_time.filter_on_or_after Time.new(2022, 5, 4, 21, 30)
# => #<NotionRubyMapping::Query:0x0000000110557880 @filter={"timestamp"=>"created_time", "created_time"=>{"on_or_after"=>"2022-05-04T21:30:00+09:00"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (date)
db.properties["RollupTitle"].filter_on_or_after Date.new(2022, 5, 7), another_type: "date"
# => #<NotionRubyMapping::Query:0x0000000109378598 @filter={"property"=>"RollupTitle", "date"=>{"on_or_after"=>"2022-05-07"}}, @page_size=100, @sort=[], @start_cursor=nil>

↑ Table of Contents

filter_on_or_before(value) → Query

filter_on_or_before creates a Query object for on_or_before filter.

db.created_time.filter_on_or_before Time.new(2022, 5, 4, 21, 30)
# => #<NotionRubyMapping::Query:0x0000000106e65f58 @filter={"timestamp"=>"created_time", "created_time"=>{"on_or_before"=>"2022-05-04T21:30:00+09:00"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (date)
db.properties["RollupTitle"].filter_on_or_before Date.new(2022, 5, 7), another_type: "date"
# => #<NotionRubyMapping::Query:0x00000001090a9ec0 @filter={"property"=>"RollupTitle", "date"=>{"on_or_before"=>"2022-05-07"}}, @page_size=100, @sort=[], @start_cursor=nil>

↑ Table of Contents

filter_next_month → Query

filter_next_month creates a Query object for next_month filter.

db.created_time.filter_next_month
=> #<NotionRubyMapping::Query:0x000000011040fea0 @filter={"timestamp"=>"created_time", "created_time"=>{"next_month"=>{}}}, @page_size=100, @sort=[], @start_cursor=nil>

↑ Table of Contents