Skip to content

Commit

Permalink
Update readme with is_full_page_or_database
Browse files Browse the repository at this point in the history
  • Loading branch information
ramnes committed Nov 4, 2023
1 parent d6b5c1e commit 37c5c0c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,14 @@ These options are all keys in the single constructor parameter.

The following functions can distinguish between full and partial API responses.

| Function | Purpose |
| ------------------- | -------------------------------------------------------------- |
| `is_full_page` | Determine whether an object is a full [Page object](https://developers.notion.com/reference/page) |
| `is_full_block` | Determine whether an object is a full [Block object](https://developers.notion.com/reference/block) |
| `is_full_database` | Determine whether an object is a full [Database object](https://developers.notion.com/reference/database) |
| `is_full_user` | Determine whether an object is a full [User object](https://developers.notion.com/reference/user) |
| `is_full_comment` | Determine whether an object is a full [Comment object](https://developers.notion.com/reference/comment-object) |
| Function | Purpose |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `is_full_page` | Determine whether an object is a full [Page object](https://developers.notion.com/reference/page) |
| `is_full_block` | Determine whether an object is a full [Block object](https://developers.notion.com/reference/block) |
| `is_full_database` | Determine whether an object is a full [Database object](https://developers.notion.com/reference/database) |
| `is_full_page_or_database` | Determine whether an object is a full [Page object](https://developers.notion.com/reference/page) or [Database object](https://developers.notion.com/reference/database) |
| `is_full_user` | Determine whether an object is a full [User object](https://developers.notion.com/reference/user) |
| `is_full_comment` | Determine whether an object is a full [Comment object](https://developers.notion.com/reference/comment-object) |
<!-- markdownlint-enable -->

```python
Expand All @@ -196,7 +197,7 @@ full_or_partial_pages = await notion.databases.query(
)

for page in full_or_partial_pages["results"]:
if not is_full_page(page):
if not is_full_page_or_database(page):
continue
print(f"Created at: {page['created_time']}")
```
Expand Down

0 comments on commit 37c5c0c

Please sign in to comment.