Class: NotionRubyMapping::DateBaseProperty

Inherits:
Property
  • Object
show all
Includes:
IsEmptyIsNotEmpty
Defined in:
lib/notion_ruby_mapping/date_base_property.rb

Overview

Date base property (date, created_time, last_edited_time, formula)

Instance Attribute Summary

Attributes inherited from Property

#name, #will_update

Instance Method Summary collapse

Methods included from IsEmptyIsNotEmpty

#filter_is_empty, #filter_is_not_empty

Methods inherited from Property

#assert_database_property, #assert_page_property, #clear_will_update, create_from_json, #database?, #initialize, #make_filter_query, #new_name=, #page?, #property_schema_json, #property_values_json, #remove, #type, #update_from_json, #update_property_schema_json

Constructor Details

This class inherits a constructor from NotionRubyMapping::Property

Instance Method Details

#filter_after(date, rollup = nil, rollup_type = nil) ⇒ Object



22
23
24
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 22

def filter_after(date, rollup = nil, rollup_type = nil)
  make_filter_query "after", value_str(date), rollup, rollup_type
end

#filter_before(date, rollup = nil, rollup_type = nil) ⇒ Object



18
19
20
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 18

def filter_before(date, rollup = nil, rollup_type = nil)
  make_filter_query "before", value_str(date), rollup, rollup_type
end

#filter_does_not_equal(date, rollup = nil, rollup_type = nil) ⇒ Object



14
15
16
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 14

def filter_does_not_equal(date, rollup = nil, rollup_type = nil)
  make_filter_query "does_not_equal", value_str(date), rollup, rollup_type
end

#filter_equals(date, rollup = nil, rollup_type = nil) ⇒ Object



10
11
12
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 10

def filter_equals(date, rollup = nil, rollup_type = nil)
  make_filter_query "equals", value_str(date), rollup, rollup_type
end

#filter_next_month(rollup = nil, rollup_type = nil) ⇒ Object



50
51
52
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 50

def filter_next_month(rollup = nil, rollup_type = nil)
  make_filter_query "next_month", {}, rollup, rollup_type
end

#filter_next_week(rollup = nil, rollup_type = nil) ⇒ Object



46
47
48
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 46

def filter_next_week(rollup = nil, rollup_type = nil)
  make_filter_query "next_week", {}, rollup, rollup_type
end

#filter_next_year(rollup = nil, rollup_type = nil) ⇒ Object



54
55
56
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 54

def filter_next_year(rollup = nil, rollup_type = nil)
  make_filter_query "next_year", {}, rollup, rollup_type
end

#filter_on_or_after(date, rollup = nil, rollup_type = nil) ⇒ Object



30
31
32
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 30

def filter_on_or_after(date, rollup = nil, rollup_type = nil)
  make_filter_query "on_or_after", value_str(date), rollup, rollup_type
end

#filter_on_or_before(date, rollup = nil, rollup_type = nil) ⇒ Object



26
27
28
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 26

def filter_on_or_before(date, rollup = nil, rollup_type = nil)
  make_filter_query "on_or_before", value_str(date), rollup, rollup_type
end

#filter_past_month(rollup = nil, rollup_type = nil) ⇒ Object



38
39
40
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 38

def filter_past_month(rollup = nil, rollup_type = nil)
  make_filter_query "past_month", {}, rollup, rollup_type
end

#filter_past_week(rollup = nil, rollup_type = nil) ⇒ Object



34
35
36
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 34

def filter_past_week(rollup = nil, rollup_type = nil)
  make_filter_query "past_week", {}, rollup, rollup_type
end

#filter_past_year(rollup = nil, rollup_type = nil) ⇒ Object



42
43
44
# File 'lib/notion_ruby_mapping/date_base_property.rb', line 42

def filter_past_year(rollup = nil, rollup_type = nil)
  make_filter_query "past_year", {}, rollup, rollup_type
end