wallhaven_rs/models/response/
user_collection.rs

1use serde::Deserialize;
2use serde_with::{BoolFromInt, serde_as};
3
4/// An user's collection of wallpapers
5///
6/// User collections are just a list of wallpaper of some category
7/// (categorized by the user that created it)
8///
9/// "Favorite wallpapers" is just a private collection, you can find it under the name "Default"
10#[serde_as]
11#[derive(Deserialize, Clone, Debug)]
12pub struct UserCollection {
13    /// The collection's id
14    pub id: u64,
15    /// The collection's name
16    pub label: String,
17    /// How many times this collection was seen
18    pub views: u64,
19    /// Whether this collection is private or not
20    #[serde_as(as = "BoolFromInt")]
21    pub public: bool,
22    /// How many wallpapers are contained in this collection
23    pub count: u64,
24}