spotify_model/spotify_model/extra.py

26 lines
430 B
Python
Raw Normal View History

2021-07-03 23:57:24 -04:00
"""
Extra type definitions that don't necessarily belong in other categories.
"""
from enum import Enum
2021-09-13 22:29:57 -04:00
from pydantic import BaseModel
2021-07-03 23:57:24 -04:00
class ReleaseDatePrecision(Enum):
"Release date precision"
YEAR = "year"
MONTH = "month"
DAY = "day"
2021-09-13 22:29:57 -04:00
class Image(BaseModel):
"""
https://developer.spotify.com/documentation/web-api/reference/#object-imageobject
"""
height: int
url: str
width: int