1use serde::{Deserialize, Serialize};
4
5use std::collections::HashMap;
6
7use crate::{ArtistId, CursorBasedPage, Followers, Image};
8
9#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Default)]
11pub struct SimplifiedArtist {
12 pub external_urls: HashMap<String, String>,
13 pub href: Option<String>,
14 pub id: Option<ArtistId<'static>>,
15 pub name: String,
16}
17
18#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
20pub struct FullArtist {
21 pub external_urls: HashMap<String, String>,
22 pub followers: Followers,
23 pub genres: Vec<String>,
24 pub href: String,
25 pub id: ArtistId<'static>,
26 pub images: Vec<Image>,
27 pub name: String,
28 pub popularity: u32,
29}
30
31#[derive(Deserialize)]
33pub struct FullArtists {
34 pub artists: Vec<FullArtist>,
35}
36
37#[derive(Deserialize)]
39pub struct CursorPageFullArtists {
40 pub artists: CursorBasedPage<FullArtist>,
41}