1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use crate::models::*;
use serde_derive::*;

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SearchResult {
    pub search_metadata: SearchMetadata,
    pub statuses: Vec<Tweet>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct PremiumSearchResult {
    pub results: Vec<Tweet>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SearchMetadata {
    pub completed_in: f64,
    pub count: u64,
    // I'm afraid of overflows...
    pub max_id: u64,
    pub max_id_str: String,
    pub next_results: Option<String>,
    pub query: String,
    pub refresh_url: Option<String>,
    pub since_id: u64,
    pub since_id_str: String,
}