mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-21 19:34:43 +02:00
Podcast endpoints (#3140)
* Add: `AudioTrack.yaml` * Fix: audiotrack example * Initial: podcast schemas and endpoints * Update schemas * Add: podcasts tag * Update bundled spec
This commit is contained in:
parent
acaf1ac196
commit
c5e60d30e1
8 changed files with 1810 additions and 0 deletions
355
docs/controllers/PodcastController.yaml
Normal file
355
docs/controllers/PodcastController.yaml
Normal file
|
@ -0,0 +1,355 @@
|
|||
paths:
|
||||
/api/podcasts:
|
||||
post:
|
||||
summary: Create a new podcast
|
||||
operationId: createPodcast
|
||||
tags:
|
||||
- Podcasts
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/Podcast'
|
||||
responses:
|
||||
200:
|
||||
description: Successfully created a podcast
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/Podcast'
|
||||
400:
|
||||
description: Bad request
|
||||
403:
|
||||
description: Forbidden
|
||||
404:
|
||||
description: Not found
|
||||
|
||||
/api/podcasts/feed:
|
||||
post:
|
||||
summary: Get podcast feed
|
||||
operationId: getPodcastFeed
|
||||
tags:
|
||||
- Podcasts
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
rssFeed:
|
||||
type: string
|
||||
description: The RSS feed URL of the podcast
|
||||
responses:
|
||||
200:
|
||||
description: Successfully retrieved podcast feed
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
podcast:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/Podcast'
|
||||
400:
|
||||
description: Bad request
|
||||
403:
|
||||
description: Forbidden
|
||||
404:
|
||||
description: Not found
|
||||
|
||||
/api/podcasts/opml:
|
||||
post:
|
||||
summary: Get feeds from OPML text
|
||||
operationId: getFeedsFromOPMLText
|
||||
tags:
|
||||
- Podcasts
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
opmlText:
|
||||
type: string
|
||||
description: The OPML text containing podcast feeds
|
||||
responses:
|
||||
200:
|
||||
description: Successfully retrieved feeds from OPML text
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/Podcast'
|
||||
400:
|
||||
description: Bad request
|
||||
403:
|
||||
description: Forbidden
|
||||
|
||||
/api/podcasts/{id}/checknew:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Podcast ID
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
||||
|
||||
get:
|
||||
summary: Check and download new episodes
|
||||
operationId: checkNewEpisodes
|
||||
tags:
|
||||
- Podcasts
|
||||
parameters:
|
||||
- name: limit
|
||||
in: query
|
||||
description: Maximum number of episodes to download
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
200:
|
||||
description: Successfully checked and downloaded new episodes
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
episodes:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../objects/entities/PodcastEpisode.yaml#/components/schemas/PodcastEpisode'
|
||||
403:
|
||||
description: Forbidden
|
||||
404:
|
||||
description: Not found
|
||||
500:
|
||||
description: Server error
|
||||
|
||||
/api/podcasts/{id}/clear-queue:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Podcast ID
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
||||
|
||||
get:
|
||||
summary: Clear episode download queue
|
||||
operationId: clearEpisodeDownloadQueue
|
||||
tags:
|
||||
- Podcasts
|
||||
responses:
|
||||
200:
|
||||
description: Successfully cleared download queue
|
||||
403:
|
||||
description: Forbidden
|
||||
|
||||
/api/podcasts/{id}/downloads:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Podcast ID
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
||||
|
||||
get:
|
||||
summary: Get episode downloads
|
||||
operationId: getEpisodeDownloads
|
||||
tags:
|
||||
- Podcasts
|
||||
responses:
|
||||
200:
|
||||
description: Successfully retrieved episode downloads
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
downloads:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../objects/entities/PodcastEpisode.yaml#/components/schemas/PodcastEpisode'
|
||||
404:
|
||||
description: Not found
|
||||
|
||||
/api/podcasts/{id}/search-episode:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Podcast ID
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
||||
|
||||
get:
|
||||
summary: Find episode by title
|
||||
operationId: findEpisode
|
||||
tags:
|
||||
- Podcasts
|
||||
parameters:
|
||||
- name: title
|
||||
in: query
|
||||
description: Title of the episode to search for
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: Successfully found episodes
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
episodes:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../objects/entities/PodcastEpisode.yaml#/components/schemas/PodcastEpisode'
|
||||
404:
|
||||
description: Not found
|
||||
500:
|
||||
description: Server error
|
||||
|
||||
/api/podcasts/{id}/download-episodes:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Podcast ID
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
||||
|
||||
post:
|
||||
summary: Download podcast episodes
|
||||
operationId: downloadEpisodes
|
||||
tags:
|
||||
- Podcasts
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: Successfully started episode download
|
||||
400:
|
||||
description: Bad request
|
||||
403:
|
||||
description: Forbidden
|
||||
|
||||
/api/podcasts/{id}/match-episodes:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Podcast ID
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
||||
|
||||
post:
|
||||
summary: Quick match podcast episodes
|
||||
operationId: quickMatchEpisodes
|
||||
tags:
|
||||
- Podcasts
|
||||
parameters:
|
||||
- name: override
|
||||
in: query
|
||||
description: Override existing details if set to 1
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: Successfully matched episodes
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
numEpisodesUpdated:
|
||||
type: integer
|
||||
403:
|
||||
description: Forbidden
|
||||
|
||||
/api/podcasts/{id}/episode/{episodeId}:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Podcast ID
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
||||
- name: episodeId
|
||||
in: path
|
||||
description: Episode ID
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
||||
|
||||
patch:
|
||||
summary: Update a podcast episode
|
||||
operationId: updateEpisode
|
||||
tags:
|
||||
- Podcasts
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
responses:
|
||||
200:
|
||||
description: Successfully updated episode
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/Podcast'
|
||||
404:
|
||||
description: Not found
|
||||
|
||||
get:
|
||||
summary: Get a specific podcast episode
|
||||
operationId: getEpisode
|
||||
tags:
|
||||
- Podcasts
|
||||
responses:
|
||||
200:
|
||||
description: Successfully retrieved episode
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../objects/entities/PodcastEpisode.yaml#/components/schemas/PodcastEpisode'
|
||||
404:
|
||||
description: Not found
|
||||
|
||||
delete:
|
||||
summary: Remove a podcast episode
|
||||
operationId: removeEpisode
|
||||
tags:
|
||||
- Podcasts
|
||||
parameters:
|
||||
- name: hard
|
||||
in: query
|
||||
description: Hard delete the episode if set to 1
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: Successfully removed episode
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/Podcast'
|
||||
404:
|
||||
description: Not found
|
||||
500:
|
||||
description: Server error
|
Loading…
Add table
Add a link
Reference in a new issue