Playlists routes
GET/v1/shows/{show}/playlists
Get playlists of a show
playlists.index
Viewer
Path parameters
Label |
Description |
show |
(int) id of the show |
Response example
{
"data": [
{
"id": 3,
"show_id": 6116,
"name": "Nostrum consectetur quidem a.",
"privacy": "public",
"public_id": "ablls4RqgxDb",
"slug": "nostrum-consectetur-quidem-a",
"html_description": "<html><head><title>Culpa quasi et commodi facilis tempore est et et eum eveniet odio.<\/title><\/head><body><div class="ut"><\/div><\/body><\/html>",
"image_url": "https:\/\/image.ausha.co\/fakeimg5_400x400.jpeg",
"podcasts_count": 6,
"created_at": "2019-07-02T09:21:56+00:00",
"updated_at": "2019-07-02T09:21:56+00:00",
"password": null
},
{
"id": 4,
"show_id": 6116,
"name": "Voluptatum quia culpa.",
"privacy": "public",
"public_id": "5BQQsWEqa2ZB",
"slug": "voluptatum-quia-culpa",
"html_description": "<html><head><title>Culpa quasi et commodi facilis tempore est et et eum eveniet odio.<\/title><\/head><body><div class="ut"><\/div><\/body><\/html>",
"image_url": "https:\/\/image.ausha.co\/fakeimg1_400x400.jpeg",
"podcasts_count": 6,
"created_at": "2019-07-02T09:21:56+00:00",
"updated_at": "2019-07-02T09:21:56+00:00",
"password": null
}
]
}
POST/v1/shows/{show}/playlists
Create a playlist
playlists.store
Editor
Path parameters
Label |
Description |
show |
(int) id of the show |
Body parameters
Label |
Description |
html_description |
string, nullable, max:4000 |
name |
required, string, min:3, max:140 |
password |
nullable, string, max:255, required_if:privacy,private |
privacy |
in:public,private,unlisted |
slug |
nullable, string, unique |
Response example
{
"data": {
"created_at": "2018-09-13T08:08:30",
"html_description": "<p>Le meilleur du Zap ! 😜<\/p>",
"id": 19,
"image_url": "https:\/\/image.ausha.co\/G6vJmtBNYP08XxILSKlxYDA3eCblCcLisozhUaDh_400x400.jpeg",
"name": "ZAP The Best",
"password": null,
"podcasts_count": 8,
"privacy": "public",
"public_id": "RykYTLKJ5WBQ",
"show_id": 15,
"slug": "zap-the-best",
"updated_at": "2018-12-10T10:14:04",
"url": "https:\/\/podcast.ausha.co\/zap-podcast\/playlist\/zap-the-best"
}
}
GET/v1/playlists/{playlist}
Get a playlist
playlists.show
Viewer
Path parameters
Label |
Description |
playlist |
(int) id of the playlist |
Response example
{
"data": {
"created_at": "2018-09-13T08:08:30",
"html_description": "<p>Le meilleur du Zap ! 😜<\/p>",
"id": 19,
"image_url": "https:\/\/image.ausha.co\/G6vJmtBNYP08XxILSKlxYDA3eCblCcLisozhUaDh_400x400.jpeg",
"name": "ZAP The Best",
"password": null,
"podcasts_count": 8,
"privacy": "public",
"public_id": "RykYTLKJ5WBQ",
"show_id": 15,
"slug": "zap-the-best",
"updated_at": "2018-12-10T10:14:04",
"url": "https:\/\/podcast.ausha.co\/zap-podcast\/playlist\/zap-the-best"
}
}
PUT/v1/playlists/{playlist}
Update a playlist
playlists.update
Editor
Path parameters
Label |
Description |
playlist |
(int) id of the playlist |
Body parameters
Label |
Description |
html_description |
string, nullable, max:4000 |
name |
string, min:3, max:140 |
password |
nullable, string, max:255, required_if:privacy,private |
privacy |
in:public,private,unlisted |
slug |
nullable, string, unique |
Response example
{
"data": {
"created_at": "2018-09-13T08:08:30",
"html_description": "<p>Le meilleur du Zap ! 😜<\/p>",
"id": 19,
"image_url": "https:\/\/image.ausha.co\/G6vJmtBNYP08XxILSKlxYDA3eCblCcLisozhUaDh_400x400.jpeg",
"name": "ZAP The Best",
"password": null,
"podcasts_count": 8,
"privacy": "public",
"public_id": "RykYTLKJ5WBQ",
"show_id": 15,
"slug": "zap-the-best",
"updated_at": "2018-12-10T10:14:04",
"url": "https:\/\/podcast.ausha.co\/zap-podcast\/playlist\/zap-the-best"
}
}
DELETE/v1/playlists/{playlist}
Delete a playlist
playlists.destroy
Editor
Returns 204 if success.
Path parameters
Label |
Description |
playlist |
(int) id of the playlist |
POST/v1/playlists/{playlist}/podcasts/{podcast}
Add a podcast to a playlist
playlists.podcast.store
Editor
Path parameters
Label |
Description |
playlist |
(int) id of the playlist |
podcast |
(int) id of the podcast |
Errors
Code |
Description |
422 |
This podcast is not in the playlist's show |
Response example
{
"data": {
"created_at": "2018-09-13T08:08:30",
"html_description": "<p>Le meilleur du Zap ! 😜<\/p>",
"id": 19,
"image_url": "https:\/\/image.ausha.co\/G6vJmtBNYP08XxILSKlxYDA3eCblCcLisozhUaDh_400x400.jpeg",
"name": "ZAP The Best",
"password": null,
"podcasts_count": 8,
"privacy": "public",
"public_id": "RykYTLKJ5WBQ",
"show_id": 15,
"slug": "zap-the-best",
"updated_at": "2018-12-10T10:14:04",
"url": "https:\/\/podcast.ausha.co\/zap-podcast\/playlist\/zap-the-best"
}
}
DELETE/v1/playlists/{playlist}/podcasts/{playlistPodcast}
Remove a podcast from a playlist
playlists.podcast.destroy
Editor
Returns 204 if success.
Path parameters
Label |
Description |
playlist |
(int) id of the playlist |
playlistPodcast |
(int) id of the relation between the playlist and the podcast |
Errors
Code |
Description |
422 |
This podcast is not in the playlist |
PUT/v1/playlists/{playlist}/podcasts/{playlistPodcast}
Change the position of a podcast inside a playlist
playlists.podcast.move
Editor
Path parameters
Label |
Description |
playlist |
(int) id of the playlist |
playlistPodcast |
(int) id of the relation between the playlist and the podcast |
Body parameters
Label |
Description |
new_position |
required, integer, between:0,nb_items_in_playlist |
Errors
Code |
Description |
422 |
This podcast is not in the playlist |
Response example
{
"data": {
"created_at": "2018-09-13T08:08:30",
"html_description": "<p>Le meilleur du Zap ! 😜<\/p>",
"id": 19,
"image_url": "https:\/\/image.ausha.co\/G6vJmtBNYP08XxILSKlxYDA3eCblCcLisozhUaDh_400x400.jpeg",
"name": "ZAP The Best",
"password": null,
"podcasts_count": 8,
"privacy": "public",
"public_id": "RykYTLKJ5WBQ",
"show_id": 15,
"slug": "zap-the-best",
"updated_at": "2018-12-10T10:14:04",
"url": "https:\/\/podcast.ausha.co\/zap-podcast\/playlist\/zap-the-best"
}
}
POST/v1/playlists/{playlist}/image
Add an image to a playlist
playlists.image.store
Editor
Warning : if any, previous image will be replaced.
Path parameters
Label |
Description |
playlist |
(int) id of the playlist |
Body parameters
Label |
Description |
file |
required, image, max:10000, dimensions:min_width=400,min_height=400 |
Response example
{
"data": {
"format": "original",
"url": "https:\/\/image.ausha.co\/YR9mY00PeymI8Uf1odqWfGDCS85IHev8bUh2xpof.jpeg"
}
}
DELETE/v1/playlists/{playlist}/image
Remove an image from a playlist
playlists.image.destroy
Editor
Returns 204 if success.
Path parameters
Label |
Description |
playlist |
(int) id of the playlist |