mangadex-api-schema-rust 0.1.0

Response structs and helpers for mangadex-api
Documentation
//! 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,
}