Skip to content
This repository was archived by the owner on Mar 29, 2025. It is now read-only.

Add initial support for Notion filters #23

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Add initial support for Notion filters #23

merged 1 commit into from
Oct 30, 2023

Conversation

scordio
Copy link
Owner

@scordio scordio commented Oct 3, 2023

See #12.

This adds a DSL for Notion filters and the entry points for the following filter conditions:

Type-Specific Conditions

Checkbox

Screenshot 2023-10-11 at 10 34 03
where().checkbox("Read").isEqualTo(true)

Multi-select

Screenshot 2023-10-11 at 10 35 28
where().multiSelect("Author").contains("Lee Vinsel")
  .or().multiSelect("Author").contains("Megan Greenwell")

Note: the DSL is more verbose than the UI screen due to the Notion API's lack of support for multiple values.

Number

Screenshot 2023-10-11 at 10 37 29
where().number("Pages").isGreaterThanOrEqualTo(42)

Select

Screenshot 2023-10-11 at 10 40 28
where().select("Score /5").isEqualTo(⭐️⭐️⭐️)
  .or().select("Score /5").isEqualTo(⭐️⭐️)

Note: the DSL is more verbose than the UI screen due to the Notion API's lack of support for multiple values.

Compound Conditions

Screenshot 2023-10-11 at 11 00 11
where().checkbox("Read").isEqualTo(true)
  .and(where().multiSelect("Author").contains("Kara Swisher").or().select("Score /5").isEqualTo(⭐️))

@scordio scordio force-pushed the notion-filter branch 3 times, most recently from a6c9c17 to 4d81b0e Compare October 9, 2023 15:50
@scordio scordio changed the title Add support for Notion filters Add initial support for Notion filters Oct 11, 2023
@scordio scordio added this to the 0.1.0-M2 milestone Oct 11, 2023
@scordio scordio mentioned this pull request Oct 11, 2023
15 tasks
@scordio scordio force-pushed the notion-filter branch 5 times, most recently from 4d1bd1e to e909946 Compare October 18, 2023 21:11
@scordio scordio force-pushed the notion-filter branch 3 times, most recently from 327b590 to 002c30d Compare October 28, 2023 08:32
@scordio scordio force-pushed the notion-filter branch 5 times, most recently from 691305f to 5f2e1e3 Compare October 30, 2023 00:35
@scordio scordio marked this pull request as ready for review October 30, 2023 00:42
@scordio scordio merged commit d21cc63 into main Oct 30, 2023
@scordio scordio deleted the notion-filter branch October 30, 2023 00:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant