rosu_render/model/
skin_list.rs1use hyper::{body::Bytes, StatusCode};
2use serde::Deserialize;
3
4use crate::{request::Requestable, ClientError};
5
6#[derive(Clone, Debug, Deserialize, PartialEq, Eq)]
8pub struct SkinList {
9 pub skins: Vec<Skin>,
11 #[serde(rename = "maxSkins")]
14 pub max_skins: u32,
15}
16
17impl Requestable for SkinList {
18 fn response_error(status: StatusCode, bytes: Bytes) -> ClientError {
19 ClientError::response_error(bytes, status.as_u16())
20 }
21}
22
23#[derive(Clone, Debug, Deserialize, PartialEq, Eq)]
24#[serde(rename_all = "camelCase")]
25pub struct Skin {
26 pub skin: Box<str>,
27 pub presentation_name: Box<str>,
28 pub url: Box<str>,
29 pub high_res_preview: Box<str>,
30 pub low_res_preview: Box<str>,
31 pub grid_preview: Box<str>,
32 pub id: u32,
33 pub author: Box<str>,
34 pub modified: bool,
35 pub version: Box<str>,
36 pub alphabetical_id: u32,
37 pub times_used: u32,
38}