<aside> 👉 Links (Property base class)

CheckboxProperty

DateProperty

FormulaProperty

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

filter_after(value) → Query

filter_after creates a Query object for after filter.

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

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

↑ 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_contains(value) → Query

filter_contains creates a Query object for contains filter.

db.properties["CreatedByTitle"].filter_contains "a_user_id"
# => #<NotionRubyMapping::Query:0x0000000110525498 @filter={"property"=>"CreatedByTitle", "created_by"=>{"contains"=>"a_user_id"}}, @page_size=100, @sort=[], @start_cursor=nil>

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

↑ Table of Contents

filter_does_not_contain(value) → Query

filter_does_not_contain creates a Query object for does_not_contain filter.

db.properties["CreatedByTitle"].filter_does_not_contain "a_user_id"
=> #<NotionRubyMapping::Query:0x0000000110666b68 @filter={"property"=>"CreatedByTitle", "created_by"=>{"does_not_contain"=>"a_user_id"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (none, any, every)
db.properties["CreatedByTitle"].filter_does_not_contain "abc", condition: "every", another_type: "people"
# => #<NotionRubyMapping::Query:0x000000010533e888 @filter={"property"=>"RollupTitle", "every"=>{"people"=>{"does_not_contain"=>"abc"}}}, @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_ends_with(str) → Query

filter_ends_with(str) creates a Query object for ends_with filter.

db.properties["MailTitle"].filter_ends_with "ac.jp"
=> #<NotionRubyMapping::Query:0x0000000105281b48 @filter={"property"=>"MailTitle", "email"=>{"ends_with"=>"ac.jp"}}, @page_size=100, @sort=[], @start_cursor=nil>

### only RollupProperty (none, any, every)
db.properties["RollupTitle"].filter_ends_with "abc", condition: "none", another_type: "rich_text"
# => #<NotionRubyMapping::Query:0x00000001054d9558 @filter={"property"=>"RollupTitle", "none"=>{"rich_text"=>{"ends_with"=>"abc"}}}, @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_greater_than(value) → Query

filter_greater_than creates a Query object for greater_than filter.

db.properties["NumberTitle"].filter_greater_than 10
# => #<NotionRubyMapping::Query:0x0000000106bddf88 @filter={"property"=>"NumberTitle", "number"=>{"greater_than"=>10}}, @page_size=100, @sort=[], @start_cursor=nil>

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

↑ Table of Contents