Add lib
This commit is contained in:
53
lib/ShazamIO/shazamio/schemas/artist/views/full_albums.py
Normal file
53
lib/ShazamIO/shazamio/schemas/artist/views/full_albums.py
Normal file
@@ -0,0 +1,53 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseDataModel
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
|
||||
|
||||
class PlayParams(BaseModel):
|
||||
id: str
|
||||
kind: str
|
||||
|
||||
|
||||
class EditorialArtwork(BaseModel):
|
||||
subscription_hero: Optional[ImageModel] = Field(None, alias="subscriptionHero")
|
||||
store_flow_case: Optional[ImageModel] = Field(None, alias="storeFlowcase")
|
||||
|
||||
|
||||
class EditorialNotes(BaseModel):
|
||||
standard: Optional[str] = None
|
||||
short: Optional[str] = None
|
||||
|
||||
|
||||
class AttributesFullAlbums(BaseModel):
|
||||
copyright: str
|
||||
genre_names: List[str] = Field(..., alias="genreNames")
|
||||
release_date: str = Field(..., alias="releaseDate")
|
||||
is_mastered_for_itunes: bool = Field(..., alias="isMasteredForItunes")
|
||||
upc: str
|
||||
artwork: ImageModel
|
||||
play_params: PlayParams = Field(..., alias="playParams")
|
||||
url: str
|
||||
record_label: str = Field(..., alias="recordLabel")
|
||||
track_count: int = Field(..., alias="trackCount")
|
||||
is_compilation: bool = Field(..., alias="isCompilation")
|
||||
is_prerelease: bool = Field(..., alias="isPrerelease")
|
||||
audio_traits: List[str] = Field(..., alias="audioTraits")
|
||||
editorial_artwork: EditorialArtwork = Field(..., alias="editorialArtwork")
|
||||
is_single: bool = Field(..., alias="isSingle")
|
||||
name: str
|
||||
artist_name: str = Field(..., alias="artistName")
|
||||
content_rating: Optional[str] = Field(None, alias="contentRating")
|
||||
is_complete: bool = Field(..., alias="isComplete")
|
||||
editorial_notes: Optional[EditorialNotes] = Field(None, alias="editorialNotes")
|
||||
|
||||
|
||||
class FullAlbumsModel(BaseModel):
|
||||
href: Optional[str] = None
|
||||
attributes: Optional[AttributeName] = None
|
||||
data: Optional[List[BaseDataModel[AttributesFullAlbums]]] = None
|
||||
42
lib/ShazamIO/shazamio/schemas/artist/views/last_release.py
Normal file
42
lib/ShazamIO/shazamio/schemas/artist/views/last_release.py
Normal file
@@ -0,0 +1,42 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseDataModel
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
|
||||
|
||||
class PlayParams(BaseModel):
|
||||
id: str
|
||||
kind: str
|
||||
|
||||
|
||||
class AttributeLastRelease(BaseModel):
|
||||
copyright: str
|
||||
genre_names: List[str] = Field(..., alias="genreNames")
|
||||
release_date: str = Field(..., alias="releaseDate")
|
||||
is_mastered_for_itunes: bool = Field(..., alias="isMasteredForItunes")
|
||||
upc: str
|
||||
artwork: ImageModel
|
||||
play_params: PlayParams = Field(..., alias="playParams")
|
||||
url: str
|
||||
record_label: str = Field(..., alias="recordLabel")
|
||||
track_count: int = Field(..., alias="trackCount")
|
||||
is_compilation: bool = Field(..., alias="isCompilation")
|
||||
is_prerelease: bool = Field(..., alias="isPrerelease")
|
||||
audio_traits: List[str] = Field(..., alias="audioTraits")
|
||||
editorial_artwork: Dict[str, Any] = Field(..., alias="editorialArtwork")
|
||||
is_single: bool = Field(..., alias="isSingle")
|
||||
name: str
|
||||
artist_name: str = Field(..., alias="artistName")
|
||||
content_rating: Optional[str] = Field(None, alias="contentRating")
|
||||
is_complete: bool = Field(..., alias="isComplete")
|
||||
|
||||
|
||||
class LastReleaseModel(BaseModel):
|
||||
href: Optional[str] = None
|
||||
attributes: Optional[AttributeName] = None
|
||||
data: Optional[List[BaseDataModel[AttributeLastRelease]]] = None
|
||||
@@ -0,0 +1,47 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseHrefNextData
|
||||
from shazamio.schemas.base import BaseIdTypeHref
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
|
||||
|
||||
class EditorialArtwork(BaseModel):
|
||||
centered_fullscreen_background: Optional[ImageModel] = Field(
|
||||
None, alias="centeredFullscreenBackground"
|
||||
)
|
||||
subscription_hero: Optional[ImageModel] = Field(None, alias="subscriptionHero")
|
||||
banner_uber: Optional[ImageModel] = Field(None, alias="bannerUber")
|
||||
|
||||
|
||||
class Attributes(BaseModel):
|
||||
genre_names: List[str] = Field(..., alias="genreNames")
|
||||
editorial_artwork: EditorialArtwork = Field(..., alias="editorialArtwork")
|
||||
name: str
|
||||
artwork: ImageModel
|
||||
url: str
|
||||
origin: Optional[str] = None
|
||||
artist_bio: Optional[str] = Field(None, alias="artistBio")
|
||||
|
||||
|
||||
class Relationships(BaseModel):
|
||||
albums: BaseHrefNextData[List[BaseIdTypeHref]]
|
||||
|
||||
|
||||
class Datum(BaseModel):
|
||||
id: str
|
||||
type: str
|
||||
href: str
|
||||
attributes: Attributes
|
||||
relationships: Relationships
|
||||
|
||||
|
||||
class SimularArtist(BaseModel):
|
||||
href: Optional[str] = None
|
||||
next: Optional[str] = None
|
||||
attributes: Optional[AttributeName] = None
|
||||
data: Optional[List[Datum]] = None
|
||||
45
lib/ShazamIO/shazamio/schemas/artist/views/top_music.py
Normal file
45
lib/ShazamIO/shazamio/schemas/artist/views/top_music.py
Normal file
@@ -0,0 +1,45 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseDataModel
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
|
||||
|
||||
class PlayParams(BaseModel):
|
||||
id: str
|
||||
kind: str
|
||||
|
||||
|
||||
class Preview(BaseModel):
|
||||
url: str
|
||||
hls_url: str = Field(..., alias="hlsUrl")
|
||||
artwork: ImageModel
|
||||
|
||||
|
||||
class Attributes(BaseModel):
|
||||
genre_names: List[str] = Field(..., alias="genreNames")
|
||||
release_date: str = Field(..., alias="releaseDate")
|
||||
duration_in_millis: int = Field(..., alias="durationInMillis")
|
||||
isrc: str
|
||||
artwork: ImageModel
|
||||
play_params: PlayParams = Field(..., alias="playParams")
|
||||
url: str
|
||||
has4_k: bool = Field(..., alias="has4K")
|
||||
editorial_artwork: Dict[str, Any] = Field(..., alias="editorialArtwork")
|
||||
has_hdr: bool = Field(..., alias="hasHDR")
|
||||
name: str
|
||||
previews: List[Preview]
|
||||
artist_name: str = Field(..., alias="artistName")
|
||||
content_rating: Optional[str] = Field(None, alias="contentRating")
|
||||
album_name: Optional[str] = Field(None, alias="albumName")
|
||||
track_number: Optional[int] = Field(None, alias="trackNumber")
|
||||
|
||||
|
||||
class TopMusicVideosView(BaseModel):
|
||||
href: Optional[str] = None
|
||||
attributes: Optional[AttributeName] = None
|
||||
data: Optional[List[BaseDataModel[Attributes]]] = None
|
||||
44
lib/ShazamIO/shazamio/schemas/artist/views/top_song.py
Normal file
44
lib/ShazamIO/shazamio/schemas/artist/views/top_song.py
Normal file
@@ -0,0 +1,44 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from shazamio.schemas.artist.views.top_music import PlayParams
|
||||
from shazamio.schemas.attributes import AttributeName
|
||||
from shazamio.schemas.base import BaseDataModel
|
||||
from shazamio.schemas.photos import ImageModel
|
||||
from shazamio.schemas.urls import UrlDTO
|
||||
|
||||
|
||||
class AttributesTopSong(BaseModel):
|
||||
has_time_synced_lyrics: bool = Field(..., alias="hasTimeSyncedLyrics")
|
||||
album_name: Optional[str] = Field(None, alias="albumName")
|
||||
genre_names: List = Field(..., alias="genreNames")
|
||||
track_number: int = Field(..., alias="trackNumber")
|
||||
release_date: str = Field(..., alias="releaseDate")
|
||||
duration_in_millis: int = Field(..., alias="durationInMillis")
|
||||
is_vocal_attenuation_allowed: bool = Field(..., alias="isVocalAttenuationAllowed")
|
||||
is_mastered_for_itunes: bool = Field(..., alias="isMasteredForItunes")
|
||||
isrc: str
|
||||
artwork: ImageModel
|
||||
composer_name: str = Field(..., alias="composerName")
|
||||
audio_locale: str = Field(..., alias="audioLocale")
|
||||
url: str
|
||||
play_params: PlayParams = Field(..., alias="playParams")
|
||||
disc_number: int = Field(..., alias="discNumber")
|
||||
has_lyrics: bool = Field(..., alias="hasLyrics")
|
||||
is_apple_digital_master: bool = Field(..., alias="isAppleDigitalMaster")
|
||||
audio_traits: List[str] = Field(..., alias="audioTraits")
|
||||
name: str
|
||||
previews: List[UrlDTO] = Field([])
|
||||
artist_name: str = Field(..., alias="artistName")
|
||||
content_rating: Optional[str] = Field(None, alias="contentRating")
|
||||
|
||||
|
||||
class TopSong(BaseModel):
|
||||
id: Optional[str] = None
|
||||
type: Optional[str] = None
|
||||
href: Optional[str] = None
|
||||
attributes: Optional[AttributeName] = None
|
||||
data: Optional[List[BaseDataModel[AttributesTopSong]]] = None
|
||||
Reference in New Issue
Block a user