""" Classes designed to manage album-like objects """ from typing import Any, Dict, List, Union from pydantic import BaseModel, Field from .extra import ReleaseDatePrecision from .paging import Paging class SearchAlbum(BaseModel): "Album as returned by the search API. Doesn't quite return a SimplifiedAlbum." album_type: str artists: List[Dict[str, Union[Dict[str, str], str]]] available_markets: List[str] external_urls: Dict[str, str] href: str spotify_id: str = Field(alias="id") images: List[Dict[str, Any]] name: str release_date: str release_date_precision: ReleaseDatePrecision total_tracks: int spotify_type: str = Field(alias="type") uri: str class SimplifiedAlbum(SearchAlbum): """ Album as returned by non-album APIs https://developer.spotify.com/documentation/web-api/reference/#object-simplifiedalbumobject """ copyrights: List[Dict[str, str]] external_ids: Dict[str, str] genres: List[str] label: str popularity: int tracks: Paging class SavedAlbum(BaseModel): """ Album as returned by the Library API https://developer.spotify.com/documentation/web-api/reference/#object-savedalbumobject """ added_at: str album: SimplifiedAlbum