33 lines
735 B
Python
33 lines
735 B
Python
"""
|
|
Classes for managing users
|
|
"""
|
|
from typing import Any, Dict, List, Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class PublicUser(BaseModel):
|
|
"""
|
|
Public information associated with a user
|
|
|
|
https://developer.spotify.com/documentation/web-api/reference/#object-publicuserobject
|
|
"""
|
|
|
|
display_name: Optional[str]
|
|
external_urls: Dict[str, str]
|
|
href: str
|
|
spotify_id: str = Field(alias="id")
|
|
spotify_type: str = Field(alias="type")
|
|
uri: str
|
|
|
|
|
|
class PrivateUser(PublicUser):
|
|
"""
|
|
Private information associated with a user
|
|
|
|
https://developer.spotify.com/documentation/web-api/reference/#object-privateuserobject
|
|
"""
|
|
|
|
followers: Dict[str, Any]
|
|
images: List[Dict[str, str]]
|