label_playlist #1
@ -6,7 +6,7 @@ from .album import SearchAlbum, SimplifiedAlbum
|
||||
from .extra import ReleaseDatePrecision
|
||||
from .paging import Paging
|
||||
from .playlist import SimplifiedPlaylist
|
||||
from .track import SimplifiedTrack
|
||||
from .track import SimplifiedTrack, Track
|
||||
from .user import PrivateUser, PublicUser
|
||||
|
||||
__all__ = [
|
||||
@ -18,4 +18,5 @@ __all__ = [
|
||||
"SimplifiedAlbum",
|
||||
"SimplifiedPlaylist",
|
||||
"SimplifiedTrack",
|
||||
"Track",
|
||||
]
|
||||
|
@ -30,7 +30,7 @@ class SearchAlbum(BaseModel):
|
||||
|
||||
class SimplifiedAlbum(SearchAlbum):
|
||||
"""
|
||||
Album as returned by the Album API
|
||||
Album as returned by non-album APIs
|
||||
|
||||
https://developer.spotify.com/documentation/web-api/reference/#object-simplifiedalbumobject
|
||||
"""
|
||||
|
@ -5,10 +5,12 @@ from typing import Dict, List, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from .album import SimplifiedAlbum
|
||||
|
||||
|
||||
class SimplifiedTrack(BaseModel):
|
||||
"""
|
||||
Track as returned by the Tracks API
|
||||
Track as returned by non-track APIs
|
||||
|
||||
https://developer.spotify.com/documentation/web-api/reference/#object-simplifiedtrackobject
|
||||
"""
|
||||
@ -28,5 +30,17 @@ class SimplifiedTrack(BaseModel):
|
||||
preview_url: Optional[str]
|
||||
restrictions: Optional[str]
|
||||
track_number: int
|
||||
type_: str = Field(alias="type")
|
||||
spotify_type: str = Field(alias="type")
|
||||
uri: str
|
||||
|
||||
|
||||
class Track(SimplifiedTrack):
|
||||
"""
|
||||
Track as returned by the Tracks APIs
|
||||
|
||||
https://developer.spotify.com/documentation/web-api/reference/#object-trackobject
|
||||
"""
|
||||
|
||||
album: SimplifiedAlbum
|
||||
external_ids: Dict[str, str]
|
||||
popularity: int
|
||||
|
Loading…
Reference in New Issue
Block a user