wip
This commit is contained in:
parent
a0d3c6cf9c
commit
d972547059
2 changed files with 13 additions and 4 deletions
|
|
@ -57,7 +57,17 @@ pub struct Spond {
|
|||
//
|
||||
//
|
||||
|
||||
crate::get!(search(), () => "sponds" -> Vec<Spond>);
|
||||
crate::get!(search(
|
||||
comments: bool,
|
||||
hidden: bool,
|
||||
add_profile_info: bool,
|
||||
scheduled: bool,
|
||||
#[builder(into)] order: Order,
|
||||
#[builder(default=20)]max: usize,
|
||||
),
|
||||
min_end_timestamp: Option<DateTime<Utc>>,
|
||||
max_end_timestamp: Option<DateTime<Utc>>,
|
||||
() => "sponds" -> Vec<Spond>);
|
||||
|
||||
//impl Search {
|
||||
// with_comments(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// GET macro
|
||||
#[macro_export]
|
||||
macro_rules! get {
|
||||
// Case 1: no query
|
||||
|
|
@ -84,8 +83,8 @@ macro_rules! get {
|
|||
}
|
||||
|
||||
async move {
|
||||
let result = client.get_with::<_, RP>(&query.as_pairs(), ( $( $arg ),* )).await?;
|
||||
Ok(result.0)
|
||||
let result = client.get_with::<_, RP>(( $( $arg ),* ), &query.as_pairs()).await?;
|
||||
Ok(result.into_inner().0)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue