<aside> đ Links (Property base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> âšī¸ â Table of Contents
</aside>
created_time
of Page property generated from properties[]
returns the created time by iso8601 date format.
created_time
of Database property generated from properties[]
returns an empty Hash {}.
created_time
of Page and Database properties generated from created_time
returns the created time by iso8601 date format.
page.properties["CreatedTimeTitle"].created_time
=> "2022-03-10T04:13:00.000Z"
db.properties["CreatedTimeTitle"].created_time
=> {}
page.created_time.created_time
=> "2022-03-10T04:13:00.000Z"
db.created_time.created_time
=> "2022-02-07T21:29:00.000Z"
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>
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>
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>
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>
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>
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>