use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Tweet {
pub id: String,
pub text: String,
pub author: String,
pub author_name: String,
pub likes: u64,
pub retweets: u64,
pub replies: u64,
pub views: Option<u64>,
pub created_at: String,
}
#[derive(Debug, Clone)]
pub struct TimelineResponse {
pub tweets: Vec<Tweet>,
pub next_cursor: Option<String>,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TimelineType {
ForYou,
Following,
}
impl TimelineType {
pub fn endpoint(&self) -> &'static str {
match self {
Self::ForYou => "HomeTimeline",
Self::Following => "HomeLatestTimeline",
}
}
pub fn method(&self) -> &'static str {
match self {
Self::ForYou => "GET",
Self::Following => "POST",
}
}
pub fn fallback_query_id(&self) -> &'static str {
match self {
Self::ForYou => "HJFjzBgCs16TqxewQOeLNg",
Self::Following => "DiTkXJgLqBBxCs7zaYsbtA",
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UserProfile {
pub screen_name: String,
pub name: String,
pub bio: String,
pub location: String,
pub url: String,
pub followers: u64,
pub following: u64,
pub tweets: u64,
pub likes: u64,
pub verified: bool,
pub created_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Trend {
pub rank: u32,
pub topic: String,
pub tweets: String,
pub category: String,
}
pub use tail_fin_common::ActionResult;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TwitterUser {
pub screen_name: String,
pub name: String,
pub bio: String,
pub followers: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Notification {
pub id: String,
pub action: String,
pub author: String,
pub text: String,
pub url: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MediaItem {
pub r#type: String,
pub url: String,
}