aboutsummaryrefslogtreecommitdiff
path: root/src/models/search.rs
diff options
context:
space:
mode:
authorGravatar Jake Swenson <jakeswenson@users.noreply.github.com> 2021-08-28 10:14:39 -0700
committerGravatar GitHub <noreply@github.com> 2021-08-28 17:14:39 +0000
commitc9266553610fd48a66048d9169da4703a0c71716 (patch)
tree0d65a763f646d8b213411328d56b99620123edc2 /src/models/search.rs
parent4fa6f626a0fc571b0293d63da78ca37b4e359af1 (diff)
downloadnotion-c9266553610fd48a66048d9169da4703a0c71716.tar.gz
notion-c9266553610fd48a66048d9169da4703a0c71716.tar.zst
notion-c9266553610fd48a66048d9169da4703a0c71716.zip
Number format parsing bug. Fixes #15 (#16)
Diffstat (limited to 'src/models/search.rs')
-rw-r--r--src/models/search.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/models/search.rs b/src/models/search.rs
index ffcac1d..aa2f62e 100644
--- a/src/models/search.rs
+++ b/src/models/search.rs
@@ -299,13 +299,24 @@ pub struct DatabaseQuery {
#[derive(Debug, Eq, PartialEq)]
pub enum NotionSearch {
+ /// When supplied, limits which pages are returned by comparing the query to the page title.
Query(String),
+ /// When supplied, sorts the results based on the provided criteria.
+ ///
+ /// Limitation: Currently only a single sort is allowed and is limited to `last_edited_time`
Sort {
timestamp: SortTimestamp,
direction: SortDirection,
},
+ /// When supplied, filters the results based on the provided criteria.
+ ///
+ /// Limitation: Currently the only filter allowed is `object` which will filter by type of object (either page or database)
Filter {
+ /// The name of the property to filter by.
+ /// Currently the only property you can filter by is the `object` type.
property: FilterProperty,
+ /// The value of the property to filter the results by.
+ /// Possible values for object type include `page` or `database`.
value: FilterValue,
},
}