mcapi 0.3.0

Unified async Rust client for the Minecraft ecosystem (Mojang, Modrinth, CurseForge, Yggdrasil, Blessing Skin, Loaders, BMCLAPI, and Java Runtimes)
Documentation
use serde::{Deserialize, Serialize};

/// Standard Blessing Skin v6 JSON response envelope.
#[derive(Clone, Debug, Deserialize, Serialize)]
pub(crate) struct BlessingEnvelope<T> {
    pub code: i32,
    #[serde(default)]
    pub message: String,
    pub data: Option<T>,
}

/// Laravel-style paginated list returned by Blessing Skin list endpoints.
#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
pub struct PaginatedList<T> {
    #[serde(default)]
    pub current_page: u32,
    #[serde(default)]
    pub last_page: u32,
    #[serde(default)]
    pub per_page: u32,
    #[serde(default)]
    pub total: u64,
    // Explicit function avoids serde adding a spurious `T: Default` bound.
    #[serde(default = "Vec::new")]
    pub data: Vec<T>,
}