1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
//! Manga statistics from a response body.
use std::collections::HashMap;
use mangadex_api_types::MangaDexDateTime;
use serde::Deserialize;
use uuid::Uuid;
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
#[non_exhaustive]
pub struct RatingsList {
pub ratings: HashMap<Uuid, Rating>,
}
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Rating {
/// `[ 1 .. 10 ]`.
pub rating: u8,
/// Datetime in `YYYY-MM-DDTHH:MM:SS+HH:MM` format.
pub created_at: MangaDexDateTime,
}