use serde::Deserialize;
#[derive(Debug, Deserialize, Clone)]
pub struct StoryResult {
pub response: Story,
}
#[derive(Debug, Deserialize, Clone)]
#[serde(rename_all = "snake_case")]
pub struct Story {
pub id: u64,
pub cover: CoverImage,
pub story_likes_count: u64,
pub age_rating: String,
pub title: String,
pub story_status: String,
pub words_count: u64,
pub overall_rating_cache: Option<f64>,
pub for_patrons_only: bool,
pub author_notes: Option<String>,
pub inline_comments: bool,
pub ai_assisted: Option<bool>,
pub chapters_count: u64,
pub reviews_count: u64,
pub addiction_tag: Option<Vec<String>>,
pub blur_image: String,
pub rev: u64,
pub teaser: String,
pub blurb: String,
pub user: User,
pub vertical_cover: VerticalCover,
pub has_access: bool,
pub content_labels: Vec<ContentLabel>,
pub test_cover: Option<CoverImage>,
pub test_summary: Option<String>,
pub test_title: Option<String>,
pub patron_icon_state: String,
pub genres: Vec<String>,
pub story_genres: Vec<StoryGenreEntry>,
}
#[derive(Debug, Deserialize, Clone)]
pub struct ContentLabel {
pub id: u64,
pub name: String,
}
#[derive(Debug, Deserialize, Clone)]
pub struct User {
pub id: u64,
pub name: String,
pub username: String,
pub small_profile_picture_url: String,
}
#[derive(Debug, Deserialize, Clone)]
pub struct CoverImage {
pub url: String,
}
#[derive(Debug, Deserialize, Clone)]
pub struct VerticalCover {
pub blur: String, pub blurhash: String, pub ipad: String, pub iphone: String, }
#[derive(Debug, Deserialize, Clone)]
pub struct StoryGenreEntry {
pub id: u64,
pub sorting_order: u64,
pub main_genre: GenreDetails,
pub sub_genre: GenreDetails,
}
#[derive(Debug, Deserialize, Clone)]
pub struct GenreDetails {
pub id: u64,
pub name: String,
pub shortname: String,
pub parent_id: Option<u64>,
pub cover_url: Option<String>,
pub small_cover_url: Option<String>,
pub icon_cover_url: Option<String>,
}