# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T09:31:31+00:00
from __future__ import annotations
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel, EmailStr, Field, RootModel
class Error(BaseModel):
code: Optional[int] = None
message: Optional[str] = None
name: Optional[str] = None
status: Optional[int] = None
type: Optional[str] = None
class Link(BaseModel):
href: Optional[str] = None
class Pagination(BaseModel):
currentPage: Optional[int] = None
pageCount: Optional[int] = None
perPage: Optional[int] = None
totalCount: Optional[int] = None
class FieldLinks1(BaseModel):
self: Optional[Link] = None
shows: Optional[List[Link]] = None
class Persona(BaseModel):
field_links: Optional[FieldLinks1] = Field(None, alias='_links')
bio: Optional[str] = Field(
None,
description='HTML-formatted biography',
examples=[
"<p>Besides DJ'ing industrial and experimental music since 1991, Deftly has performed in industrial ..."
],
)
email: Optional[EmailStr] = Field(
None, description="DJ/host's email address", examples=['example@spinitron.com']
)
id: Optional[int] = Field(None, examples=[2832])
image: Optional[str] = Field(
None,
examples=[
'https://spinitron.com/images/Persona/28/2832-img_profile-original.jpg'
],
)
name: Optional[str] = Field(
None, description='On-air DJ/host name', examples=['Deftly-D']
)
since: Optional[int] = Field(
None,
description='Since what year has the DJ/host been at the station?',
examples=[1991],
)
website: Optional[str] = Field(
None,
description='URL to web site for the DJ/host',
examples=['https://spinitron.com/example/doesnt/exist'],
)
class FieldLinks2(BaseModel):
persona: Optional[Link] = None
self: Optional[Link] = None
show: Optional[Link] = None
spins: Optional[Link] = None
class Playlist(BaseModel):
field_links: Optional[FieldLinks2] = Field(None, alias='_links')
automation: Optional[bool] = Field(
None,
description='Was the playlist created playlists created by a radio station automation system?',
examples=[False],
)
category: Optional[str] = Field(
None, description='Program/show category', examples=['Music']
)
description: Optional[str] = Field(
None,
description='HTML-formatted description of the playlist or program/show',
examples=[
'It is a <em>cross-\xadcultural musical journey united in voices and rhythms</em>.'
],
)
duration: Optional[int] = Field(
None, description='Duration in seconds', examples=[3600]
)
end: Optional[datetime] = Field(
None, description='UTC datetime ISO-8601', examples=['2018-03-30T14:00:00+0000']
)
episode_description: Optional[str] = Field(
None,
description='HTML-formatted description of the episode',
examples=['<p>Episode description</p>'],
)
episode_name: Optional[str] = Field(
None, description='Title of this episode of the program/show'
)
hide_dj: Optional[bool] = Field(
None,
description="Should the client application hide information about the playlist's DJ/host?",
examples=[False],
)
id: Optional[int] = Field(None, examples=[219992])
image: Optional[str] = Field(
None,
examples=['https://spinitron.com/images/Show/44/4498/img_show-original.jpg'],
)
persona_id: Optional[int] = Field(None, examples=[2832])
show_id: Optional[int] = Field(None, examples=[4498])
since: Optional[int] = Field(
None,
description='Since what year has the program/show existed?',
examples=[1999],
)
start: Optional[datetime] = Field(
None, description='UTC datetime ISO-8601', examples=['2018-03-30T13:00:00+0000']
)
timezone: Optional[str] = Field(
None, description="Station's time zone", examples=['America/Chicago']
)
title: Optional[str] = Field(
None, description='Program/show title', examples=['Transworld Airwaves']
)
url: Optional[str] = Field(
None, description='URL to web site for the playlist or program/show'
)
class FieldLinks3(BaseModel):
personas: Optional[List[Link]] = None
playlists: Optional[Link] = None
self: Optional[Link] = None
class Show(BaseModel):
field_links: Optional[FieldLinks3] = Field(None, alias='_links')
category: Optional[str] = Field(
None, description='Program/show category', examples=['Music']
)
description: Optional[str] = Field(
None,
description='HTML-formatted description of the playlist or program/show',
examples=[
'<p>Since 2001, <strong>The High Voltage Circumcision</strong> show has delivered a full spectrum barrage of dark hard and experimental music from industrial to noise to idm to ebm to bizarre to audio collage often with a side of live guests, social consciousness, interviews, twisted humor, studio experiments and left turns.</p>'
],
)
duration: Optional[int] = Field(
None, description='Duration in seconds', examples=[10800]
)
end: Optional[datetime] = Field(
None, description='UTC datetime ISO-8601', examples=['2018-04-03T02:00:00+0000']
)
hide_dj: Optional[bool] = Field(
None,
description="Should the client application hide information about the show's DJs/hosts?",
examples=[False],
)
id: Optional[int] = Field(None, examples=[4498])
image: Optional[str] = Field(
None,
examples=['https://spinitron.com/images/Show/44/4498/img_show-original.jpg'],
)
one_off: Optional[bool] = Field(
None,
description='Is the show a one-off in the schedule instead of repeating?',
examples=[False],
)
since: Optional[int] = Field(
None,
description='Since what year has the program/show existed?',
examples=[2001],
)
start: Optional[datetime] = Field(
None, description='UTC datetime ISO-8601', examples=['2018-04-02T23:00:00+0000']
)
timezone: Optional[str] = Field(
None, description="Station's time zone", examples=['America/Chicago']
)
title: Optional[str] = Field(
None,
description='Program/show title',
examples=['Voidstar Productions’ High Voltage Circumcision Show'],
)
url: Optional[str] = Field(
None,
description='URL to web site for the program/show',
examples=['https://spinitron.com/example/doesnt/exist'],
)
class FieldLinks4(BaseModel):
playlist: Optional[Link] = None
self: Optional[Link] = None
class Spin(BaseModel):
field_links: Optional[FieldLinks4] = Field(None, alias='_links')
artist: Optional[str] = Field(None, examples=['The Beatles'])
artist_custom: Optional[str] = Field(
None,
alias='artist-custom',
description="Station-specific custom field relating to the song's artist",
)
catalog_number: Optional[str] = Field(
None,
alias='catalog-number',
description="Reference number in the record label's catalog",
examples=['5C 006-04982'],
)
classical: Optional[bool] = Field(
None,
description='Is the track\'s metadata schema "classical" rather than "popular"?',
examples=[False],
)
composer: Optional[str] = Field(None, examples=['Lennon - McCartney'])
conductor: Optional[str] = Field(
None,
description='For classical music, conducor of the ensemble',
examples=['Herbert von Karajan'],
)
duration: Optional[int] = Field(
None, description='Duration in seconds', examples=[199]
)
end: Optional[datetime] = Field(
None, description='UTC datetime ISO-8601', examples=['2018-03-30T13:10:25+0000']
)
ensemble: Optional[str] = Field(
None,
description='For classical music, orchestra, performing ensemble, choir, etc.',
examples=['Vienna Philharmonic Orchestra'],
)
genre: Optional[str] = Field(None, examples=['Pop'])
id: Optional[int] = Field(None, examples=[8017277])
image: Optional[str] = Field(
None,
description='Cover art',
examples=[
'https://is5-ssl.mzstatic.com/image/thumb/Music3/v4/ef/e8/67/efe8674e-467a-adfe-9f67-8d50860b4f1e/dj.sokyjuyt.jpg/170x170bb.jpg'
],
)
isrc: Optional[str] = Field(None, examples=['GBAYE9901218'])
iswc: Optional[str] = Field(None, examples=['T-010.434.166-3'])
label: Optional[str] = Field(
None,
description='Record label, i.e. publisher of the sound recording',
examples=['Apple Records'],
)
label_custom: Optional[str] = Field(
None,
alias='label-custom',
description='Station-specific custom field relating to the record label',
)
local: Optional[bool] = Field(
None, description='Is the artist local to the station?', examples=[False]
)
medium: Optional[str] = Field(
None,
description='Media format in which the sound recording was reased',
examples=['7"'],
)
new: Optional[bool] = Field(
None, description='Is this a recent release?', examples=[False]
)
note: Optional[str] = Field(
None,
description='HTML-formatted DJ annotation of the spin, can include images etc.',
examples=[
'B-side of the <strong>original</strong> 7" vinyl in the station\'s collection.'
],
)
performers: Optional[str] = Field(
None,
description='For classical music, featured performing artists, e.g. soloists',
examples=['Rohan DeSaram (cello), Marianne Schroeder (piano)'],
)
playlist_id: Optional[int] = Field(None, examples=[336722])
release: Optional[str] = Field(None, examples=['All Together Now / Hey Bulldog'])
release_custom: Optional[str] = Field(
None,
alias='release-custom',
description='Station-specific custom field relating to the release',
)
released: Optional[int] = Field(
None, description='Year of initial release', examples=[1972]
)
request: Optional[bool] = Field(
None, description='Was the spin requested by a listener?', examples=[False]
)
song: Optional[str] = Field(
None, description='Title of the song or track', examples=['Hey Bulldog']
)
start: Optional[datetime] = Field(
None, description='UTC datetime ISO-8601', examples=['2018-03-30T13:07:08+0000']
)
timezone: Optional[str] = Field(
None, description="Station's time zone", examples=['America/Chicago']
)
upc: Optional[str] = Field(
None,
description='Universal Product Code of the release',
examples=['4006408126775'],
)
va: Optional[bool] = Field(
None, description='Is it a "Various Artists" release?', examples=[False]
)
work: Optional[str] = Field(
None,
description='For classical music, the main compositional work the track (see `song` field) belongs to',
examples=['The Marriage of Figaro'],
)
class ValidationError(BaseModel):
field: Optional[str] = None
message: Optional[str] = None
class Fields(RootModel[List[str]]):
root: List[str]
class Expand(RootModel[List[str]]):
root: List[str]
class SpinsPostRequest(BaseModel):
artist: str
composer: Optional[str] = None
duration: Optional[int] = None
genre: Optional[str] = None
isrc: Optional[str] = None
label: Optional[str] = None
live: Optional[bool] = Field(
None,
description='Only when automation params are configured with the "Pass through" mode.\nEnables "live assist" mode. Default mode is "full automation".\n',
)
release: Optional[str] = None
song: str
start: Optional[datetime] = None
class SpinsPostResponse(RootModel[List[ValidationError]]):
root: List[ValidationError]
class FieldLinks(BaseModel):
self: Optional[Link] = None
class BaseIndexResponse(BaseModel):
field_links: Optional[FieldLinks] = Field(None, alias='_links')
field_meta: Optional[Pagination] = Field(None, alias='_meta')
class PersonasGetResponse(BaseIndexResponse):
items: Optional[List[Persona]] = None
class PlaylistsGetResponse(BaseIndexResponse):
items: Optional[List[Playlist]] = None
class ShowsGetResponse(BaseIndexResponse):
items: Optional[List[Show]] = None
class SpinsGetResponse(BaseIndexResponse):
items: Optional[List[Spin]] = None