Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for filtering databases using the Status property type #54

Merged
merged 3 commits into from
Dec 31, 2024

Conversation

khaptonstall
Copy link
Contributor

Adds additional database property filter support for the status property type.

Example Usage

databaseQuery(
    databaseId: databaseId,
    params: .init(filter: .property(name: "Status", type: .status(.equals("Done"))))
)

Example Request

POST /v1/databases/<id>/query HTTP/1.1
Host: api.notion.com
Content-Type: application/json
Accept-Encoding: gzip, deflate, br
User-Agent: notion2markdown (unknown version) CFNetwork/1496.0.7 Darwin/23.5.0
Connection: keep-alive
Accept: */*
Accept-Language: en-US,en;q=0.9
Notion-Version: 2022-06-28
Authorization: Bearer <token>
Content-Length: 64
Pragma: no-cache
Cache-Control: no-cache

{"filter":{"status":{"equals":"Done"},"property":"Status"}}

@chojnac chojnac merged commit 3dd2406 into chojnac:main Dec 31, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants