podcast-api 3.0.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/package.json +1 -1
- package/src/PodcastApiMethods.js +3 -0
- package/src/api-contract.json +20 -1
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@ If you have any questions, please contact [hello@listennotes.com](hello@listenno
|
|
|
53
53
|
- [`fetchPodcastsByDomain`](#fetchpodcastsbydomain) — `GET /podcasts/domains/{domain_name}`
|
|
54
54
|
- [`createPlaylist`](#createplaylist) — `POST /playlists`
|
|
55
55
|
- [`updatePlaylist`](#updateplaylist) — `PUT /playlists/{id}`
|
|
56
|
+
- [`deletePlaylist`](#deleteplaylist) — `DELETE /playlists/{id}`
|
|
56
57
|
- [`addPlaylistItem`](#addplaylistitem) — `POST /playlists/{id}/items`
|
|
57
58
|
- [`deletePlaylistItem`](#deleteplaylistitem) — `DELETE /playlists/{id}/items/{item_id}`
|
|
58
59
|
- [`updatePlaylistItemNotes`](#updateplaylistitemnotes) — `PUT /playlists/{id}/items/{item_id}`
|
|
@@ -783,6 +784,31 @@ client.updatePlaylist({
|
|
|
783
784
|
|
|
784
785
|
[Full API documentation](https://www.listennotes.com/api/docs/#put-api-v2-playlists-id)
|
|
785
786
|
|
|
787
|
+
### deletePlaylist
|
|
788
|
+
|
|
789
|
+
Delete a playlist.
|
|
790
|
+
|
|
791
|
+
`DELETE /playlists/{id}`
|
|
792
|
+
|
|
793
|
+
Permanently delete a playlist, including all episode and podcast references saved in this specific playlist and their notes. The actual episodes and podcasts remain in the Listen Notes podcast database.
|
|
794
|
+
|
|
795
|
+
**Warning: Deletion cannot be undone. Once deleted, the playlist is gone, regardless of how many episodes or podcasts it contains. You, the developer, are responsible for adding a confirmation step in your app's UI before calling this endpoint to prevent accidental deletion.**
|
|
796
|
+
|
|
797
|
+
Only playlists owned by your admin API account can be modified; contributor membership does not grant write access.
|
|
798
|
+
|
|
799
|
+
```javascript
|
|
800
|
+
const { Client } = require('podcast-api');
|
|
801
|
+
const client = Client({ apiKey: process.env.LISTEN_API_KEY || null });
|
|
802
|
+
|
|
803
|
+
client.deletePlaylist({
|
|
804
|
+
"id": "m1pe7z60bsw"
|
|
805
|
+
})
|
|
806
|
+
.then((response) => console.log(response.data))
|
|
807
|
+
.catch((error) => console.error(error));
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
[Full API documentation](https://www.listennotes.com/api/docs/#delete-api-v2-playlists-id)
|
|
811
|
+
|
|
786
812
|
### addPlaylistItem
|
|
787
813
|
|
|
788
814
|
Add an episode or podcast to a playlist.
|
package/package.json
CHANGED
package/src/PodcastApiMethods.js
CHANGED
|
@@ -83,6 +83,9 @@ const addApiMethodsToClient = (client) => {
|
|
|
83
83
|
client.updatePlaylist = (params = {}) => request(
|
|
84
84
|
client.httpClient, "PUT", "/playlists/{id}",
|
|
85
85
|
{"path": ["id"], "query": [], "body": ["name", "description", "visibility", "type"]}, params);
|
|
86
|
+
client.deletePlaylist = (params = {}) => request(
|
|
87
|
+
client.httpClient, "DELETE", "/playlists/{id}",
|
|
88
|
+
{"path": ["id"], "query": [], "body": []}, params);
|
|
86
89
|
client.addPlaylistItem = (params = {}) => request(
|
|
87
90
|
client.httpClient, "POST", "/playlists/{id}/items",
|
|
88
91
|
{"path": ["id"], "query": [], "body": ["episode_id", "podcast_id", "notes"]}, params);
|
package/src/api-contract.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"operations": [
|
|
5
5
|
{
|
|
6
6
|
"operationId": "search",
|
|
@@ -815,6 +815,25 @@
|
|
|
815
815
|
"summary": "Update playlist metadata.",
|
|
816
816
|
"description": "Update any subset of name, description, visibility, and type. Omitted fields remain unchanged; at least one field is required. Switching to private rotates the playlist RSS secret. Type selects the saved default view (episode_list or podcast_list) and the returned listennotes_url; changing it preserves all existing episodes and podcasts.\n\nOnly playlists owned by your admin API account can be modified; contributor membership does not grant write access."
|
|
817
817
|
},
|
|
818
|
+
{
|
|
819
|
+
"operationId": "deletePlaylist",
|
|
820
|
+
"func": "deletePlaylist",
|
|
821
|
+
"available_from": "3.1.0",
|
|
822
|
+
"method": "DELETE",
|
|
823
|
+
"path": "/playlists/{id}",
|
|
824
|
+
"parameters": [
|
|
825
|
+
{
|
|
826
|
+
"name": "id",
|
|
827
|
+
"in": "path",
|
|
828
|
+
"required": true
|
|
829
|
+
}
|
|
830
|
+
],
|
|
831
|
+
"example_params": {
|
|
832
|
+
"id": "m1pe7z60bsw"
|
|
833
|
+
},
|
|
834
|
+
"summary": "Delete a playlist.",
|
|
835
|
+
"description": "Permanently delete a playlist, including all episode and podcast references saved in this specific playlist and their notes. The actual episodes and podcasts remain in the Listen Notes podcast database.\n\n**Warning: Deletion cannot be undone. Once deleted, the playlist is gone, regardless of how many episodes or podcasts it contains. You, the developer, are responsible for adding a confirmation step in your app's UI before calling this endpoint to prevent accidental deletion.**\n\nOnly playlists owned by your admin API account can be modified; contributor membership does not grant write access."
|
|
836
|
+
},
|
|
818
837
|
{
|
|
819
838
|
"operationId": "addPlaylistItem",
|
|
820
839
|
"func": "addPlaylistItem",
|