Skip to content

Commit aaa7d76

Browse files
Sync from pod-engine-monorepo @ b5cd9678bc5f8f6a861f6bd8466649904f410dc9
1 parent a71b118 commit aaa7d76

3 files changed

Lines changed: 181 additions & 2 deletions

File tree

‎openapi.json‎

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13491,6 +13491,15 @@
1349113491
"description": "Podengine ID, Apple ID, or slug"
1349213492
}
1349313493
},
13494+
{
13495+
"name": "includePublishingRhythm",
13496+
"in": "query",
13497+
"required": false,
13498+
"schema": {
13499+
"description": "Include a 26-week publication heatmap and cadence summary, independent of episode pagination and transcript filtering.",
13500+
"type": "boolean"
13501+
}
13502+
},
1349413503
{
1349513504
"name": "hasTranscript",
1349613505
"in": "query",
@@ -13540,6 +13549,10 @@
1354013549
"options": {
1354113550
"type": "object",
1354213551
"properties": {
13552+
"includePublishingRhythm": {
13553+
"description": "Include a 26-week publication heatmap and cadence summary, independent of episode pagination and transcript filtering.",
13554+
"type": "boolean"
13555+
},
1354313556
"hasTranscript": {
1354413557
"type": "boolean"
1354513558
},
@@ -13985,6 +13998,124 @@
1398513998
"episodes"
1398613999
],
1398714000
"additionalProperties": false
14001+
},
14002+
"publishingRhythm": {
14003+
"type": "object",
14004+
"properties": {
14005+
"start": {
14006+
"type": "string",
14007+
"format": "date-time",
14008+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
14009+
},
14010+
"end": {
14011+
"type": "string",
14012+
"format": "date-time",
14013+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
14014+
},
14015+
"days": {
14016+
"type": "array",
14017+
"items": {
14018+
"type": "object",
14019+
"properties": {
14020+
"date": {
14021+
"type": "string",
14022+
"format": "date",
14023+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
14024+
},
14025+
"count": {
14026+
"type": "integer",
14027+
"minimum": 0,
14028+
"maximum": 9007199254740991
14029+
},
14030+
"runtimeSeconds": {
14031+
"type": [
14032+
"number",
14033+
"null"
14034+
]
14035+
},
14036+
"future": {
14037+
"type": "boolean"
14038+
}
14039+
},
14040+
"required": [
14041+
"date",
14042+
"count",
14043+
"runtimeSeconds",
14044+
"future"
14045+
],
14046+
"additionalProperties": false
14047+
}
14048+
},
14049+
"episodeCount": {
14050+
"type": "integer",
14051+
"minimum": 0,
14052+
"maximum": 9007199254740991
14053+
},
14054+
"truncated": {
14055+
"type": "boolean"
14056+
},
14057+
"medianRuntimeSeconds": {
14058+
"type": [
14059+
"number",
14060+
"null"
14061+
]
14062+
},
14063+
"medianIntervalDays": {
14064+
"type": [
14065+
"number",
14066+
"null"
14067+
]
14068+
},
14069+
"emptyWeeks": {
14070+
"type": "array",
14071+
"items": {
14072+
"type": "string",
14073+
"format": "date",
14074+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
14075+
}
14076+
},
14077+
"weekdayShift": {
14078+
"type": [
14079+
"object",
14080+
"null"
14081+
],
14082+
"properties": {
14083+
"fromDay": {
14084+
"type": "integer",
14085+
"minimum": 0,
14086+
"maximum": 6
14087+
},
14088+
"toDay": {
14089+
"type": "integer",
14090+
"minimum": 0,
14091+
"maximum": 6
14092+
},
14093+
"since": {
14094+
"type": "string",
14095+
"format": "date",
14096+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
14097+
}
14098+
},
14099+
"required": [
14100+
"fromDay",
14101+
"toDay",
14102+
"since"
14103+
],
14104+
"additionalProperties": false
14105+
}
14106+
},
14107+
"required": [
14108+
"start",
14109+
"end",
14110+
"days",
14111+
"episodeCount",
14112+
"truncated",
14113+
"medianRuntimeSeconds",
14114+
"medianIntervalDays",
14115+
"emptyWeeks",
14116+
"weekdayShift"
14117+
],
14118+
"additionalProperties": false
1398814119
}
1398914120
},
1399014121
"required": [

‎src/podengine/_generated/models.py‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,18 +1900,51 @@ class GetPodcastResponse(BaseModel):
19001900
class GetPodcastEpisodesResponseOptions(BaseModel):
19011901
model_config = ConfigDict(populate_by_name=True)
19021902

1903+
include_publishing_rhythm: bool | None = Field(default=None, alias="includePublishingRhythm")
19031904
has_transcript: bool | None = Field(default=None, alias="hasTranscript")
19041905
skip: int | None = None
19051906
limit: int | None = None
19061907

19071908

1909+
class GetPodcastEpisodesResponsePublishingRhythmDaysItem(BaseModel):
1910+
model_config = ConfigDict(populate_by_name=True)
1911+
1912+
date: str
1913+
count: int
1914+
runtime_seconds: float | None = Field(alias="runtimeSeconds")
1915+
future: bool
1916+
1917+
1918+
class GetPodcastEpisodesResponsePublishingRhythmWeekdayShift(BaseModel):
1919+
model_config = ConfigDict(populate_by_name=True)
1920+
1921+
from_day: int = Field(alias="fromDay")
1922+
to_day: int = Field(alias="toDay")
1923+
since: str
1924+
1925+
1926+
class GetPodcastEpisodesResponsePublishingRhythm(BaseModel):
1927+
model_config = ConfigDict(populate_by_name=True)
1928+
1929+
start: datetime
1930+
end: datetime
1931+
days: list[GetPodcastEpisodesResponsePublishingRhythmDaysItem]
1932+
episode_count: int = Field(alias="episodeCount")
1933+
truncated: bool
1934+
median_runtime_seconds: float | None = Field(alias="medianRuntimeSeconds")
1935+
median_interval_days: float | None = Field(alias="medianIntervalDays")
1936+
empty_weeks: list[str] = Field(alias="emptyWeeks")
1937+
weekday_shift: GetPodcastEpisodesResponsePublishingRhythmWeekdayShift | None = Field(alias="weekdayShift")
1938+
1939+
19081940
class GetPodcastEpisodesResponse(BaseModel):
19091941
model_config = ConfigDict(populate_by_name=True)
19101942

19111943
options: GetPodcastEpisodesResponseOptions
19121944
total_episodes: float = Field(alias="totalEpisodes")
19131945
total_transcripts: float = Field(alias="totalTranscripts")
19141946
podcast_with_episodes: GetLatestEpisodesResponseLatestPodcastsItem = Field(alias="podcastWithEpisodes")
1947+
publishing_rhythm: GetPodcastEpisodesResponsePublishingRhythm | None = Field(default=None, alias="publishingRhythm")
19151948

19161949

19171950
class GetPodcastRelatedPodcastsResponseRelatedPodcasts(BaseModel):

‎src/podengine/_generated/resources.py‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@
336336
path="/api/v1/podcasts/{podcastIdOrSlug}/episodes",
337337
path_params=("podcastIdOrSlug",),
338338
query_params=(
339+
"includePublishingRhythm",
339340
"hasTranscript",
340341
"skip",
341342
"limit",
@@ -1513,6 +1514,7 @@ def get_podcast_episodes(
15131514
self,
15141515
*,
15151516
podcast_id_or_slug: str,
1517+
include_publishing_rhythm: bool | None = None,
15161518
has_transcript: bool | None = None,
15171519
skip: int | None = None,
15181520
limit: int | None = None,
@@ -1526,7 +1528,13 @@ def get_podcast_episodes(
15261528
return _adapter_getPodcastEpisodes.validate_python(
15271529
self._core.request(
15281530
_DESCRIPTORS["getPodcastEpisodes"],
1529-
{"podcastIdOrSlug": podcast_id_or_slug, "hasTranscript": has_transcript, "skip": skip, "limit": limit},
1531+
{
1532+
"podcastIdOrSlug": podcast_id_or_slug,
1533+
"includePublishingRhythm": include_publishing_rhythm,
1534+
"hasTranscript": has_transcript,
1535+
"skip": skip,
1536+
"limit": limit,
1537+
},
15301538
request_options,
15311539
)
15321540
)
@@ -3227,6 +3235,7 @@ async def get_podcast_episodes(
32273235
self,
32283236
*,
32293237
podcast_id_or_slug: str,
3238+
include_publishing_rhythm: bool | None = None,
32303239
has_transcript: bool | None = None,
32313240
skip: int | None = None,
32323241
limit: int | None = None,
@@ -3240,7 +3249,13 @@ async def get_podcast_episodes(
32403249
return _adapter_getPodcastEpisodes.validate_python(
32413250
await self._core.request(
32423251
_DESCRIPTORS["getPodcastEpisodes"],
3243-
{"podcastIdOrSlug": podcast_id_or_slug, "hasTranscript": has_transcript, "skip": skip, "limit": limit},
3252+
{
3253+
"podcastIdOrSlug": podcast_id_or_slug,
3254+
"includePublishingRhythm": include_publishing_rhythm,
3255+
"hasTranscript": has_transcript,
3256+
"skip": skip,
3257+
"limit": limit,
3258+
},
32443259
request_options,
32453260
)
32463261
)

0 commit comments

Comments
 (0)