Description Usage Arguments Details Examples
A helper function for creating 'Sort objects' used by Notion API in Search and Query.
1 2 3 4 5 | sort_notion(
property = character(),
direction = character(),
timestamp = character()
)
|
property |
A character vector represented the name of the
property to sort against. Should be omitted, when used inside
|
direction |
A character vector represented the direction to sort.
Either |
timestamp |
A character vector represented The name of the timestamp
to sort against. Either |
please check: https://developers.notion.com/reference/post-search and https://developers.notion.com/reference/post-database-query
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Size of one
sort_1 <- sort_notion(property = "Ingredients", direction = "descending", timestamp = "last_edited_time")
sort_1
# Size of N (all element should have an equal length or 1)
sort_n <- sort_notion(
property = LETTERS[1:4],
direction = "ascending",
timestamp = rep(c("last_edited_time", "created_time"), 2)
)
# Coercing sort criteria with 'c()'
c(sort_1, sort_n)
# Omit properties when use inside notion search
notion_search(
sort = sort_notion(direction = "ascending", timestamp = "last_edited_time"),
page_size = 4
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.