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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use crate::models::*;
use serde_derive::*;
use serde_json::Value;
#[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 FavoriteResult {
pub user: Option<Value>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct RetweetResult {
pub user: Value,
pub retweeted_status: Value,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct TweetResult {
pub created_at: Value,
pub text: Value,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SearchMetadata {
pub completed_in: f64,
pub count: u64,
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,
}